imagecolorclosestalpha

PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
imagecolorclosestalpha - Get the index of the closest color to the specified color + alpha
Manual
Code Examples

Example #1 Search for a set of colors in an image

Result: #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).
PHP Version:


Function imagecolorclosestalpha:

Image Processing and GD Functions

Most used PHP functions