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

后端 未结 4 1131
谎友^
谎友^ 2020-12-08 17:07

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

4条回答
  •  悲&欢浪女
    2020-12-08 17:21

    Using the wiki link used in Artefacto's answer I grabbed all the color names and formed an array containing 1,175 color names. Unfortunately Stackoverflow only allows 30,000 characters in answers so here's the link.

提交回复
热议问题