后续文章需要用到,很简单的一个小函数
/// <summary> /// 自定义颜色 /// </summary> /// <param name="r">The r.</param> /// <param name="g">The g.</param> /// <param name="b">The b.</param> /// <returns>IRgbColor</returns> /// <remarks></remarks> private static IRgbColor ColorCustom(int r, int g, int b) { IRgbColor myColor = new RgbColor(); myColor.Red = r; myColor.Blue = b; myColor.Green = g; return myColor; }