PHP/Graphics Image/Image Color
Color: red, green and blue
<?php
header("Content-type: image/gif");
$imgcord = imagecreate(250,300);
$red = imagecolorallocate($imgcord, 255,0,0);
$green = imagecolorallocate($imgcord, 0,255,0);
$blue = imagecolorallocate($imgcord, 0,0,255);
imageline($imgcord, 5,5, 125,50, $red);
imagearc($imgcord, 100,25, 120,125, 0, 180, $green);
ImagePNG($imgcord);
ImageDestroy($imgcord);
?>
Create Color for paint
<html>
<body>
<?php
$img=ImageCreate(200,200);
$bgcolor=ImageColorAllocate($img,200,200,200);
$pixelcolor=ImagecolorAllocate($img,255,0,0);
ImageSetPixel($img,50,50,$pixelcolor);
ImagePNG($img,"pic.png");
ImageDestroy($img);
?>
<img src="pic.png" border=0>
</body>
</html>