Is it possible to get a colour name in iOS based o

2020-03-30 04:47发布

问题:

I want to get a colour name based on some RGB values. How can I accomplish this?

回答1:

It is possible.

It is enough to prepare a list of colors tagged with names in RGB. Then find the color that is nearest by some metric. Euclidean distance will do.

There is an article from xkcd with a color survey. They even give you the survey database to fiddle around with. Quality of data is not guaranteed but a good base nevertheless.



标签: ios colors