Click here to Skip to main content
13,147,376 members (28,138 online)
Click here to Skip to main content
Add your own
alternative version


1 bookmarked
Posted 6 Nov 2011

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");

System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("White");

Further Reading


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


About the Author

Web Developer
India India
Retired from Q/A section & Technical forums since 2014

More coming soon....

You may also be interested in...


Comments and Discussions

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

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 6 Nov 2011
Article Copyright 2011 by thatraja
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid