to create the colors as blocks. You could set up image.php something like.
<?
header("Content-type: images/png");
$im=imagecreate(15, 15) or die("Cannot create");
srand((double) microtime() * 1000000);
$rc=rand(1, 255);
$gc=rand(1, 255);
$bc=rand(1, 255);
$background_color=imagecolorallocate($im, $rc, $gc, $bc);
$text_color=imagecolorallocate($im, 255, 255, 255);
imagestring($im, 1, 5, 5, "", $text_color);
imagepng($im);
?>
then set up a for loop to create the html and put <IMG src="image.php">. Each time the image.php is called it will create a small colored block as an image.
Mark.