Red, Green, Blue to hexidecial colors!
http://phpbar.isgreat.org/viewtopic.php?f=4&t=8Here is an example on how to use it^^^:
function displayMessage(color) // ive removed all vars and functions not related to this example..
{
if(empty(color))
{
color = "EAE8FF";
}
color = color.replace("#", ""); //substr(-6); has problems as well as some other things so i changed it
rgb = [];
rgb = hex2RGB(color);
rgb['red'] += 10;
rgb['green'] += 10; //by adding 10 to rgb, i am making the color lighter by 10 points;
rgb['blue'] += 10;
rgbHex = RGB2Hex(rgb['red'],rgb['green'],rgb['blue']);
document.getElementById('messageDisplay').style.backgroundColor = "#" + rgbHex;
document.getElementById('messageDisplayValue').style.backgroundColor = "#" + color;
}