pixelEngine
09-06-2006, 03:10 PM
Ok, I have a function being passed hex color values, however I need them a bit darken than what they actually are (think #eaeaea instead of #ffffff). So I guess my question is this, can this be done with JS?
I was thinking I could just convert the hex to RGB somehow and then add '20' or whatever onto each value so long as its not greater than 235. Or SOMETHING along those lines.
Will this work, and if so does anyone know of a good script to start with for RGB conversion?
Cheers!! :p
I was thinking I could just convert the hex to RGB somehow and then add '20' or whatever onto each value so long as its not greater than 235. Or SOMETHING along those lines.
Will this work, and if so does anyone know of a good script to start with for RGB conversion?
Cheers!! :p