sureshIOS
sureshIOS

Reputation: 71

Is it possible to get a colour name in iOS based on RGB values?

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

Upvotes: 1

Views: 615

Answers (1)

mrVoid
mrVoid

Reputation: 995

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.

Upvotes: 4

Related Questions