imagecolorat

PHP 4, PHP 5, PHP 7, PHP 8
imagecolorat - Get the index of the color of a pixel
Manual
Code Examples

Example #1 Access distinct RGB values

Result: int(119) int(123) int(180)
PHP Version:

Example #2 Human-readable RGB values using imagecolorsforindex

Result: array(4) { ["red"]=> int(119) ["green"]=> int(123) ["blue"]=> int(180) ["alpha"]=> int(127) }
PHP Version:


Function imagecolorat:

Image Processing and GD Functions

Most used PHP functions