Hex colors in System.Drawing
In ASP.Net, the methods of System.Drawing.Color do not seem to allow the use of Hex colors which are normally used in web pages. This is annoying, but there is a work-around. To get this to work, you need to use the Color.FromARGB method and preface the color with "&H78". Like so:
will set the color to be #336699
someVar = Color.FromARGB(&H78336699)
will set the color to be #336699
| Rating: | 100% positive, 1 Vote |
| Categories: | ASP .Net web |
| Added: | on May 25, 2007 at 8:44 am |
| Added By: | an anonymous user |


BRILLIANT post!!!
Thanks