Function that converts hex color values to an approximate color name?

Posted by dclowd9901 on Stack Overflow See other posts from Stack Overflow or by dclowd9901
Published on 2010-06-07T23:55:50Z Indexed on 2010/06/08 0:02 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

I don't suppose anyone knows of a function (PHP, preferably) that can take a hex color code and give an approximate color name for that hex value. I don't need a solution with 100s of colors. Even if it just amounted to the colors white, black, red, green blue, brown orange and yellow, I'd be pretty well in shape.

If you don't know of an existing resource, does anyone know of a good way to approach this problem?

Thanks in advance for the help.

© Stack Overflow or respective owner

Related posts about php

Related posts about conversion