How to get color names from its rgb value [closed]

2019-02-20 12:41发布

I'm writing a program to get the name of a color. I can get the rgb value of the pixel, but couldn't find out how to get its name. Is there any c++ library that can get the name of a color from its rgb value? Or find the closest matching color name?

标签: c++ colors rgb
1条回答
Animai°情兽
2楼-- · 2019-02-20 13:14

Aside from HTML color tables, there's also the RAL standard, a well known system used in the industry.

What one would need is basically the code table with names and RGB values. One can easily find the closest match for the appropriate color name, as long as the table's resolution and spectrum is sufficient:

A simple CSV reader, to load the color tables may be a solution.

查看更多
登录 后发表回答