PHP imagecolorclosest - Get the index of the color closest to the specified color
imagecolorclosest - Get the index of the color closest to the specified color.
grammar
int imagecolorclosest ( resource $image , int $red , int $green , int $blue )
Returns the image palette and RGB value specified is "closest" color.
Calculation Method "distance" specified color palette of each color is the RGB values as three-dimensional coordinates of points in space.
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
- imagecolorexact () Get the index of the specified color.