重点内容
在WPF的画刷中经常用到
using System.Drawing;
public static void Mian()
{
System.Console.WriteLine("111");
String color = Rgb216(140, 140, 140);
System.Console.WriteLine(color);
}
public static string Rgb216(int r, int g, int b)
{
return ColorTranslator.ToHtml(Color.FromArgb(r, g, b));
}
//添加引用 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Drawing.dll