Comment on How the algorithm for coloring the iTunes song list worksComments−visarga13yHow I'd do it:1. pick 500 random points from the album art2. cluster them in 10 classes (k-means is an old, well understood algorithm)3. pick the median point of dominant class for the bg4. pick a contrasting color from a different cluster for the text−raverbashing13yI 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
Comments
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
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