PHP imagecolorresolve - Get the Index of the Specified Color or the Closest Possible Alternative
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
- imagecolorclosest() Get the index value of the color closest to the specified color.
PHP Image Processing