PHP imagecolorexact - Gets the index value of the specified color

PHP imagecolorexact - Get the index value of the specified color PHP image processing

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

PHP imagecolorexact - Get the index value of the specified color PHP image processing