Quote:
Originally Posted by DrakilorP2P
rgbtohex() returns the wrong hex for me too.
|
Well, however it is written, it should probably just use format() instead:
PHP Code:
function RGBtoHex(red, green, blue)
return format("#%.2x%.2x%.2x", red * 255, green * 255, blue * 255);