Forum Moderators: coopster
Red: 100 Blue: 100 Yellow: 100 (#646464)
How could I convert this to HTML colors( by using PHP)?
-- globay
is this what you mean?
Red: 50 -> 32 (Hexadecimal) Green: 100 -> 64 Blue: 200 -> C8
-> #3264C8
Basically it is how to transform 100 (dezimal) to 100 (Hexadecimal).
-- thanks; globay
--------- <Added> Just found the solution! dechex( )</added>
Nick
$color = sprintf("#%x%x%x", 100, 100, 100);
$color will contain the string #646464
Andreas
sprintf() will make it even easier!
Those functions are the way to go.