Php Imagecolorexact
# PHP imagecolorexact - Get the Index Value of a Specified Color
[PHP Image Processing](#)
imagecolorexact β Get the index value of a specified color.
### Syntax
int imagecolorexact ( resource $image , int $red , int $green , int $blue )
Returns the index value of the specified color in the image's palette.
If the color is not in the image's palette, returns -1.
If the image was created from a file, only colors used in the image will be resolved. Colors that only appear in the palette will not be resolved.
### Related Articles
Get the index value of the color closest to the specified color.
[PHP Image Processing](#)
YouTip