Hello
I want to generate web safe color. The code is not working. How do I make it work?
Thanks.
<?php
$value = array('FF','CC','99','66','33','00');
foreach($value as $R_Hex)
foreach($value as $G_Hex)
foreach($value as $B_Hex){
$R = hexdec($R_Hex);
$G = hexdec($G_Hex);
$B = hexdec($B_Hex);
header("Content-type: image/png");
$image = imagecreate(15,15);
$color = imagecolorallocate($image, $R, $G, $;
imagefilledrectangle($image, 0 , 0, 15, 15, $color);
imagepng($image);
imagedestroy($image);
}
?>