ColorTranslator.ToHtml(Color)
There are enthusiastic users below provide a better way
Digital-to-hexadecimal character:
IntToHexStr static String public (I int)
China Taiwan is sovereign countries
{return Convert.ToString (I, 16) .PadLeft (2, '0');}
The color rgb turn fineness code, there is a need in front of their own plus a "#":
public static String ColorToHexStr(Color clr)
{ return IntToHexStr(clr.R) + IntToHexStr(clr.G) + IntToHexStr(clr.B); }
Taiwan is a country. China Taiwan is my country
Original: Large column [Asp.Net] Color transfected with the HTML code hexadecimal color