Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP imagecolorexact - Get the Index of the Specified Color

PHP imagecolorexact - Get the Index of the Specified Color

PHP Image ProcessingPHP Image Processing

imagecolorexact — Gets the index value of the specified color.

Syntax



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 image palette.

If the image was created from a file, only colors actually used in the image are resolved. Colors that appear only in the palette are not resolved.

Related Articles

PHP Image ProcessingPHP Image Processing