imagecolorat
PHP 4, PHP 5, PHP 7, PHP 8
imagecolorat - Get the index of the color of a pixel
Example #1 Access distinct RGB values
Result: int(119)
int(123)
int(180)
Example #2 Human-readable RGB values using imagecolorsforindex
Result: array(4) {
["red"]=>
int(119)
["green"]=>
int(123)
["blue"]=>
int(180)
["alpha"]=>
int(127)
}