Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Mobile / WinMobile

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

4.88/5 (5 votes)
6 Nov 2011CPOL 36.1K  
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:
C#
System.Drawing.Color mycol = System.Drawing.ColorTranslator.FromHtml("#FFFFFF");

or:
C#
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)