How to convert colors in RGB format to hex format and vice versa?
For example, convert \'#0080C0\' to (0, 128, 192).
\'#0080C0\'
(0, 128, 192)
May you be after something like this?
function RGB2HTML(red, green, blue) { return '#' + red.toString(16) + green.toString(16) + blue.toString(16); } alert(RGB2HTML(150, 135, 200));
displays #9687c8