| 
 | imagecolorclosestalphaGet the index of the closest color to the specified color + alpha Description
   int imagecolorclosestalpha
    ( resource  $image, int$red, int$green, int$blue, int$alpha)
   Returns the index of the color in the palette of the image which
   is "closest" to the specified RGB value and 
    Parameters
 
 Return ValuesReturns the index of the closest color in the palette. Examples
 Example #1 Search for a set of colors in an image 
<?phpThe above example will output something similar to: #0: Search (254, 145, 154, 50); Closest match: (252, 150, 148, 0). #1: Search (153, 145, 188, 127); Closest match: (148, 150, 196, 0). #2: Search (153, 90, 145, 0); Closest match: (148, 90, 156, 0). #3: Search (255, 137, 92, 84); Closest match: (252, 150, 92, 0). Notes
 See Also
 
 |