是否可以在iOS中基于RGB值获取颜色名称? [英] Is it possible to get a colour name in iOS based on RGB values?
本文介绍了是否可以在iOS中基于RGB值获取颜色名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想根据一些RGB值获取颜色名称。
这足以准备一个带有RGB名称标记的颜色列表。然后找到一些指标最接近的颜色。欧氏距离。
有一篇来自 xkcd 与颜色调查。他们甚至给你调查数据库搞砸。数据质量无法保证,但仍是一个良好的基础。
I want to get a colour name based on some RGB values. How can I accomplish this?
解决方案
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中基于RGB值获取颜色名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文