A script that changes colors depending on get variable
important to note: I had little success with pngs and getting true red
gifs work much better
<?php
$y = 1 - ceil($_GET["c"]/2);
$r = 1 - floor($_GET["c"]/2);
$b = floor($_GET["c"]/2);
$gd = imagecreatefromgif("example.gif");
imagecolorset($gd, imagecolorexact($gd, 255, 0, 0), $r*255, $y*255, $b*255);
imagecolorset($gd, imagecolorexact($gd, 191, 0, 0), $r*191, $y*191, $b*191);
imagecolorset($gd, imagecolorexact($gd, 128, 0, 0), $r*128, $y*128, $b*128);
imagecolorset($gd, imagecolorexact($gd, 255, 0, 0), $r*64, $y*64, $b*64);
header('Content-Type: image/gif');
imagegif($gd);
?>