Im trying to convert a hex ref to rgb to use with the gd image manipulation.
try:
$rgb = chunk_split('ff0000', 2);
// convert hex values to decimal
$r = hexdec($rgb[0]);
$g = hexdec($rgb[1]);
$b = hexdec($rgb[2]);
echo($r);
echo($g);
echo($b);
gives:
15150
where id expect 25500
any pointers?
ta