How would you get the colors from an allocated color
something like…
$col = imagecolorallocate($im, 255, 50, 5);
//A fake function - rgbfromallocate (that I wish I knew)
$rgb = rgbfromallocate($col);
print $rgb['r'];//255
print $rgb['g'];//50
print $rgb['b'];//5
Maybe
imagecolorsforindex()is what you’re looking for?For example: