Get hexadecimal RGB value from System.Drawing.Color
Here’s a simple function that returns the hexadecimal RGB value of a System.Drawing.Color
private string ToHexadecimalRgb(Color color)
{
return color.ToArgb().ToString("X").Substring(2);
}
EDIT Apparently there is also a ColorTranslator with methods ToHtml and FromHtml.