The PEAR::Image_Color manages and handles color data and conversions. WWW: http://pear.php.net/package/Image_Color