Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

Go to top

Converting HTML Color Code to System.Drawing.Color(WinMobile application)

, 6 Nov 2011
Rate this:
Please Sign up or sign in to vote.
Here is a simple method:System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("#FFFFFF");or:System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("White");Further ReadingColorTranslator.FromHtml Method @ MSDN[^]
Here is a simple method:
System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("#FFFFFF");
or:
System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("White");

Further Reading

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

thatraja
Web Developer
India India
Programmer | Dude | ||||||
 
About him & his blog? check out here. Currently he's updating the site, he'll return soon there with more things*.
 
In Codeproject, he posted a blogpost & more than couple of Tip/Tricks, hope he'll write more soon.
 
Favorite techs are MVC, WCF, Mobile, HTML5, CSS3, jQuery, etc.,
 
His hobbies are watching movies, CP, being alone, etc., But now he's working on something*.
 
* - SCAMP???
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
GeneralMy vote of 5 PinmemberAjith_joseph14-Nov-12 19:58 
GeneralThanks Richard and ThatRaja for your comments. That is also ... PinmemberMidhunlal G22-Jan-12 17:41 
GeneralThis works great if you're absolutely sure the input string ... PinmemberRichard Deeming8-Nov-11 8:03 
GeneralRe: Agree, I didn't handle those things(Because its just a Tip/T... Pinmvpthatraja16-Nov-11 1:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 6 Nov 2011
Article Copyright 2011 by thatraja
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid