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

PHP imagecolorresolve - Get the Index of the Specified Color or the Closest Possible Alternative

PHP imagecolorresolve - Get the Index of the Specified Color or the Closest Possible Alternative

PHP Image ProcessingPHP Image Processing

imagecolorresolve — Gets the index of the specified color or the closest possible alternative.

Syntax



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

This function guarantees that a color index is returned for the requested color, either the exact value or the closest alternative obtainable.

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