public class ColorUtil { public static Color ReturnColorFromString(string color) { string alpha = color.Substring(0, 2); string red = color.Substring(2, 2); string green = color.Substring(4, 2); string blue = color.Substring(6, 2); byte alphaByte = Convert.ToByte(alpha, 16); byte redByte = Convert.ToByte(red, 16); byte greenByte = Convert.ToByte(green, 16); byte blueByte = Convert.ToByte(blue, 16); return Color.FromArgb(alphaByte, redByte, greenByte, blueByte); } }
silverlight如何将颜色字符串转换为颜色
最新推荐文章于 2017-11-16 16:30:00 发布