PHP Manual: imagecolorsforindex
imagecolorsforindex
Description
array imagecolorsforindex ( resource image, int index )Gets the color for a specified index.
Parameters
imageAn image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
index
Return Values
Returns an associative array with red, green, blue and alpha keys that contain the appropriate values for the specified color index.
Examples