In C#, how can I convert a Color object into a byte value?
For example, the color #FFF would be converted to the value 255>
You can use ConvertFromString() method from ColorConverter class.
Attempts to convert a string to a Color.
Return Value
Type: System.Object
A Color that represents the converted text.
ColorConverter c = new ColorConverter();
Color color = (Color)c.ConvertFromString("#FFF");
Console.WriteLine(color.Name);