确定UIImage的主要和次要颜色 [英] Determine primary and secondary colors of a UIImage

查看:84
本文介绍了确定UIImage的主要和次要颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人可以帮我弄清楚如何确定UIImage中的主要主要和次要颜色。我无法在谷歌找到任何非常有用的东西。

I was wondering if someone could help me figure out how I can determine the main primary and secondary colors in a UIImage. I haven't been able to find anything terribly useful in Google.

推荐答案

Panic的工程师写了一个进行颜色分析的算法类似于iTunes 11中的内容(确定良好的主要,次要和细节颜色)。他们在他们的博客上发布了有关其工作原理的解释和代码

The engineers at Panic wrote an algorithm for doing colour analysis similar to that found in iTunes 11 (to determine good primary, secondary, and detail colours). They posted an explanation of how it works and the code on their blog.

这篇关于确定UIImage的主要和次要颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆