Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Color to Hex String
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00997937
Message ID:
00998042
Views:
30
Bill,
You are welcome.

Einar
>Hi Einar,
>
>Ok, thanks. I'll give that a try.
>
>>Bill,
>>A little bit of typing will get you the result you want:
>>
>>System.Drawing.Color myColor = System.Drawing.Color.Blue;
>>System.String sColor = myColor.R.ToString("X2") + myColor.G.ToString("X2") + myColor.B.ToString("X2");
>>MessageBox.Show(sColor);
>>
>>
>>Hope this helps.
>>
>>Einar
>>
>>>This should be a no-brainer and I'm sure I can figure it out (eventually :-) ), but in the interest of expediency, what is the .NET syntax to convert a Color object color value to a hex string?
>>>
>>>E.g. Color.Blue would be "0000FF"
>>>
>>>Thanks,
>>>Bill
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform