Most web developers are quite comfortable using CSS to stylize their websites. But oftentimes they will design (or have designed) a template in Photoshop before creating the HTML template. Sometimes it can be a real headache to convert the RGB colors to the proper hexadecimal values for use in CSS.
So, if this is what you need to do, you can use this color conversion PHP class to do the work for you! It can accept an array with the values of a color as separate RGB component values, and then do the conversion to provide the proper hexadecimal representation. If you need to, you can also use it the other way – to convert hexadecimal color values to RGB representation.
As a side benefit, this PHP class also validates color values in RGB or hexadecimal formats, to determine whether whether or not the values correspond to a valid color.