i work now with GD library on PHP and i'm trying to get the pixel color name ,i mean : green , red , blue , etc...
i'm getting the color this way :
$rgb = ImageColorAt($image, $X, $y);
$r = ($rgb >> 16) & 0xFF ;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
now , how can i find it this color is green light , dark blue , normal blue or red and etc..
you have to create an associative-array that maps value => colorname (or inverse). fill this array with the data of this table: http://en.wikipedia.org/wiki/Web_colors
then you can lookup the color names, that are available in CSS too. additionally you can add more, own, colornames
Are you suppose that every color has its own name?
It's 16^6>16.7 millions.
So, it seems to be impossible.
But you may create your own database (format rgb => human-readable)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With