I am currently working on creating a script that will allow people to pick a certain hex code, and an image will appear that is the color they selected. I believe you need to use some GD for this, I may be wrong but thats why I'm here! Heres an example of my script:
$base = @imagecreate(397, 500);
$background_color = imagecolorallocate($base, 250, 255, 255);
$body = imagecreatefromgif('images/base.gif');
imagecolortransparent($body);
imagecopymerge ($base, $body, '0', '0', '0', '0', '397', '500', '100');
imagedestroy($body);
$part1 = imagecreatefromgif('images/partone.gif');
imagecolortransparent($part1);
imagecopymerge ($base, $part1, '0', '0', '0', '0', '397', '500', '100');
imagedestroy($part1);
imagegif($base,'images/test.gif');
imagedestroy($base);
This all works fine, I just don't know how to code it so the $body image would be able to turn black or gray and then the $part1 image could turn green or purple (just examples). Any suggestions? I tried looking through tutorials but nothing helped. Thanks!