News for hackers. Stuff that matters.
Re:How the algorithm for coloring the iTunes song list works by nimeshneema on Wednesday July 03, 2013 @01:31AM (#5982674)
You may find this post by Wade Cosgrove of Panic interesting

http://www.panic.com/blog/2012/12/itunes-11-and-colors/

Re:How the algorithm for coloring the iTunes song list works by lukashed on Wednesday July 03, 2013 @09:02AM (#5984205)
I've taken their algorithm and ported it over to JavaScript a while ago: https://github.com/lukashed/itunes-colors
Re:How the algorithm for coloring the iTunes song list works by visarga on Wednesday July 03, 2013 @02:59AM (#5982910)
How I'd do it:

1. pick 500 random points from the album art

2. cluster them in 10 classes (k-means is an old, well understood algorithm)

3. pick the median point of dominant class for the bg

4. pick a contrasting color from a different cluster for the text

Re:How the algorithm for coloring the iTunes song list works by raverbashing on Wednesday July 03, 2013 @03:43AM (#5983026)
I wouldn't pick the median of the dominant class for the BG, but rather from the borders (even though this could work)

for 4 you want that, picking from one of the colors of the album or a contrasting color if this is not available from the album

Re:How the algorithm for coloring the iTunes song list works by jemhoff on Wednesday July 03, 2013 @09:47AM (#5984434)
How I'd do it: Use Embedly! Our extract API returns the dominant colors of all the images it finds: http://embed.ly/docs/extract/api/response#extract-images

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.

To see this in action, check out http://tightro.pe.

Re:How the algorithm for coloring the iTunes song list works by mwexler on Wednesday July 03, 2013 @09:48AM (#5984439)
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's new in the update, the background reflects the colors of the icon, which can make for some odd combinations...
Re:How the algorithm for coloring the iTunes song list works by kenrikm on Wednesday July 03, 2013 @02:48AM (#5982878)
I've done something similar in one of my older iOS apps however I used a 8x8 sample. Still an interesting read.
Re:How the algorithm for coloring the iTunes song list works by Jleagle on Wednesday July 03, 2013 @04:40AM (#5983202)
So iTunes changes colour for every album you click on? This sounds awful..
Re:How the algorithm for coloring the iTunes song list works by jbrooksuk on Wednesday July 03, 2013 @05:39AM (#5983398)
Not really. It changes the background colour of the album view , see http://thomaspark.me/wordpress/wp-content/uploads/2012/12/it...