PHP imagecolorexact - Gets the index value of the specified color
Imagecolorexact - Gets the index value of the specified color.
Grammar
int imagecolorexact ( resource $image , int $red , int $green , int $blue )
Returns the index value of the specified color in the image palette.
Returns -1 if the color is not in the color palette of the image.
If you create an image from a file, only the colors used in the image are distinguished. Colors that appear only in the palette are not distinguished.
Related articles
- Imagecolorclosest() obtains the index value of the color closest to the specified color.