Now I am working with the GD library in PHP and I am trying to get the name of the color of the pixel, I mean: green, red, blue, etc.
I get the color this way:
$rgb = ImageColorAt($image, $X, $y);
$r = ($rgb >> 16) & 0xFF ;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
Now, as I can find this color, it is green light, blue, ordinary blue or red, etc.
source
share