>Hi everybody,
>
>We store result of the GetColor function in the database as integer value. Now we want to use this in Web Application to set the color. Do you know what is the simplest way to convert this integer value into the value suitable for HTML (in C# / JavaScript code, if possible)?
>
>Thanks in advance.
Naomi,
Prepend its hexadecimal value with # and you can use the full string as the value for a color in HTML.
'#' + (rgbColorValueAsResultOfGetColor).toString(16);
Edited: not exactly this simple, because of the way HTML uses hex shorthand (for instance, "#ccc" is in fact read as "#cccccc")...
----------------------------------
António Tavares Lopes