Latest web development tutorials

PHP imagecolorexact - get the index value of the specified color

PHP Image Processing PHP Image Processing

imagecolorexact - get the index value of the specified color.

grammar

int imagecolorexact ( resource $image , int $red , int $green , int $blue )

Returns the image specified palette index color.

If the image is not in color palette, -1 is returned.

If you create an image from a file, only the colors used in the image will be discrimination. Appears only in the color palette is not discrimination.

related articles

PHP Image Processing PHP Image Processing