将十六进制背景色转换为PHP中的GIF


Converting hex background color into a GIF in PHP

是否有任何方法可以将十六进制颜色(#fffff)转换为PHP上的小gif图像?

....

<?php
// create the image
$im = imagecreatetruecolor(100, 100);
// fill the image with the color you want
imagefilledrectangle($im, 0, 0, 99, 99, 0xFFFFFF);
// set the headers and output the image
header('Content-Type: image/gif');
imagegif($im);
imagedestroy($im);
?>
http://www.php.net/manual/en/function.imagegif.php