Hi Moondaddy,
From your description, you'd like to convert the web color's string hex
value(string) into a System.Drawing.Color class's instance, yes?
In think the System.Drawing.ColorTranslator class is the one you want, it
has a member function called "FromHtml" which can help translate a web
color's string hex value into a Color instance, for example:
Color clr = ColorTranslator.FromHtml("#0000FF");
will return a color instance(clr) which represent the following color:
Color [A=255, R=0, G=0, B=255]
In addtion, below is the ColorTranslator class's document in MSDN:
#ColorTranslator Class
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdrawingcolortr
anslatorclasstopic.asp?frame=true
#ColorTranslator.FromHtml Method
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDrawingColorTr
anslatorClassFromHtmlTopic.asp?frame=true
Hope helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx