TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How the algorithm for coloring the iTunes song list works

102 点作者 cgs将近 12 年前

6 条评论

nimeshneema将近 12 年前
You may find this post by Wade Cosgrove of Panic interesting<p><a href="http://www.panic.com/blog/2012/12/itunes-11-and-colors/" rel="nofollow">http:&#x2F;&#x2F;www.panic.com&#x2F;blog&#x2F;2012&#x2F;12&#x2F;itunes-11-and-colors&#x2F;</a>
评论 #5984205 未加载
visarga将近 12 年前
How I&#x27;d do it:<p>1. pick 500 random points from the album art<p>2. cluster them in 10 classes (k-means is an old, well understood algorithm)<p>3. pick the median point of dominant class for the bg<p>4. pick a contrasting color from a different cluster for the text
评论 #5983026 未加载
jemhoff将近 12 年前
How I&#x27;d do it: Use Embedly! Our extract API returns the dominant colors of all the images it finds: <a href="http://embed.ly/docs/extract/api/response#extract-images" rel="nofollow">http:&#x2F;&#x2F;embed.ly&#x2F;docs&#x2F;extract&#x2F;api&#x2F;response#extract-images</a><p>For those that are curious, what happens under the covers is a random sampling of the image followed by a conversion to LAB color space (even better than YUV in terms of human perception) and finally some K-means clustering.<p>To see this in action, check out <a href="http://tightro.pe" rel="nofollow">http:&#x2F;&#x2F;tightro.pe</a>.
mwexler将近 12 年前
They also use a similar trick based on the icon colors for the iTunes ios app update feature (for those of us who still like plugging our phone or tablet into the USB cable). In the latest iTunes, when you click on an app in icon mode to find out what&#x27;s new in the update, the background reflects the colors of the icon, which can make for some odd combinations...
kenrikm将近 12 年前
I&#x27;ve done something similar in one of my older iOS apps however I used a 8x8 sample. Still an interesting read.
Jleagle将近 12 年前
So iTunes changes colour for every album you click on? This sounds awful..
评论 #5983398 未加载