| Author |
Converting RGB to Hex?
|
|
| Lars Netzel 2004-12-31, 8:56 am |
| Hello!
I'm creating a servercontrol where you can set a Color property in the
design view. This is going into a STYLE attribut in the rendered HTML code
and I need to convert it to a HEX value... how do I do this?
The only thing I can find is the Color.ToArgb and that is not working for
me.
Best Regards/
Lars Netzel
| |
| Chance Hopkins 2004-12-31, 8:56 am |
| Just off the top of my head I think it's Color.FromName("#000000") or
something like that (maybe no #).
"Lars Netzel" <troligt@apa.se> wrote in message
news:u5sljoy7EHA.2452@TK2MSFTNGP14.phx.gbl...
> Hello!
>
> I'm creating a servercontrol where you can set a Color property in the
> design view. This is going into a STYLE attribut in the rendered HTML code
> and I need to convert it to a HEX value... how do I do this?
>
> The only thing I can find is the Color.ToArgb and that is not working for
> me.
>
> Best Regards/
> Lars Netzel
>
| |
| Lars Netzel 2004-12-31, 3:57 pm |
| No actually it was a ColorTranslator
'this create a HEX value for the web from a Color
ColorTranslator.ToHtml(Me.BackColor)
best Regards
/Lars
"Chance Hopkins" <chance_hopkins@hotmail.com> skrev i meddelandet
news:eH9fSty7EHA.1404@TK2MSFTNGP11.phx.gbl...
> Just off the top of my head I think it's Color.FromName("#000000") or
> something like that (maybe no #).
>
> "Lars Netzel" <troligt@apa.se> wrote in message
> news:u5sljoy7EHA.2452@TK2MSFTNGP14.phx.gbl...
>
>
|
|
|
|