
ITunes 11 and Colors - thisisblurry
http://www.panic.com/blog/2012/12/itunes-11-and-colors/
======
robflynn
I do love that feature. I developed something like this a couple years ago for
a back office part of a project:

<https://www.dropbox.com/sh/4p5m4719ehvpohc/GUEHcYecYv>

I don't have a good example of the project any longer, but I took a few
snapshots during the development process. My test page allowed you to upload a
logo and have the page dynamically change to match the new logo. The link
above is a gallery of a few of my tests.

Sometimes it did a pretty good job. Other times the results were a little more
'meh.'

The original code was pretty hacked together in PHP and a little client side
JS, though I've been considering resurrecting it as a ruby gem.

There was a bug in the code in one of these examples. The 5th image or so is
of a tornado with a bright orange background. The code failed to select the
orange as an interesting color to use. The result still looks fine but I would
have liked for it to have sampled that bit as well. It's been long enough that
I can't recall what the exact problem was.

~~~
thomaspark
Very cool. Here's my attempt at it, which uses the JS library Color Thief:
<http://thomaspark.me/project/expandingalbums/>

~~~
robflynn
Very nice! That color thief library would have made my work a lot easier.

Here's the process I did without pasting my embarrassingly hacky code:

* Accepted image from user

* Quantized the image down to 6 main colors (I forget how I arrived at this figure.)

* Slapped it on a canvas

* Generated a color histogram

* Converted RGB to HSB

* Did a border check of the image to determine the background color. Extended the border based on most common background color if needed.

* Looked at the saturation of the colors to determine what might be interesting to use. Picked a primary and secondary color from that.

* From there I converted each of the color to YIQ to determine contrast levels to determine if I needed lighter or darker colors for the text.

* Generated some "accent" colors by modifying lightness levels of some of the primary and secondary colors.

From there I pretty much had the things I needed to make something theme-like.

Thanks for posting this. I enjoyed reading over the code. You also reminded me
that I need to ditch my crappy JS tempting library that I wrote and switch to
moustache.

------
joeguilmette
Until just recently I was an iTunes power user. I have a 15 year old 80gb
collection of pirated music - all full albums, all with pristine metadata and
personalized genres. I do not have cover art tho, but I don't really care -
until now.

iTunes 11 makes a big deal about cover art - their UI is nearly exclusively
dependent on it. I don't like thumbnails.

When I look at my music, I want a big sortable list. I don't want a bunch of
random (alphabetized) tiles that don't tell me much. Also - electronic music
of today is largely post-album. It doesn't make sense to organize a bunch of
remixes by different DJ by album cover.

The previous version of iTunes had a hybrid view that had a sorted list with a
small thumbnail to the left. It was useful because the thumbnails would scroll
nicely with the text.

But no longer as far as I can tell.

The whole idea of curating my own collection, through either piracy or
purchasing, seems outmoded to me. It's expensive even when it's free. Pirating
music, at least at scale, is time consuming. iTunes is ridiculously expensive.
My music collection would cost me $20k if I bought it and it feels woefully
inadequate when I try find something to listen to.

I just recently backed up my music collection and deleted it from my HD. I've
signed up for Spotify Premium and am so far pleased.

$10 is very fair (a bit high, but fair). The quality is consistent, I can save
songs and playlists to my devices (feels like buying) and create radio
stations that are functionally superior to Pandora (skipping, etc) but
algorithmically inferior (try getting it to play Louis Armstrong style music
and see how long it takes to play modern music, for me it's two tracks
regardless of downvotes).

Music discovery is just as important as curation, and Spotify scratches both
itches. The iOS apps are buggy but so far it's working. I'm happy to leave
iTunes behind. That said, I really loved SmartPlaylists. SmartPlaylists +
Accurate Genres + Ratings = Powerful, Granular Track Syncing. It's just too
time consuming, and now hard to manage with new emphasis on cover art.

~~~
forrestthewoods
I hope you don't really think that $10 is "bit high, but fair". Spotify is
horrible for artists and pays them next to nothing. Assuming you fully own the
rights to your music it takes 232,000 plays per month just to make minimum
wage for a single artist [1]. Now consider that Spotify, and similar streaming
services, are losing money hand over fist and it's obvious this model can not
last [2].

Personally I put Spotify at the same tier as piracy. I mean that not in terms
of morals or ethics but in regards to the viability of the industry. If you
want to copy all music ever recorded that's fine, go for it. We're almost all
guilty to some extent. If however you'd like to see new music created in the
future then you owe it to yourself to compensate the artists you enjoy.

The most dangerous thing about Spotify is that people genuinely believe
listening to a few ads an hour or paying a mere $10/month is enough to support
the industry they love.

[1]
[http://www.digitalmusicnews.com/permalink/2012/120730infamou...](http://www.digitalmusicnews.com/permalink/2012/120730infamous)
[2] <http://www.businessinsider.com/spotify-revenue-2012-10>

~~~
joeguilmette
I know a couple musicians, some of them earn enough to survive thanks to their
art, most don't.

I know that if I had talent I could create and distribute an album on my
laptop and distribute it globally. We used to pay record labels for this. Now
we pay them to stand in the way of artists and their fans.

Regardless, musicians don't really make money from people listening to their
music and never really have - unless you're talking about A-listers, but since
we're talking about starving artists we're probably not talking about
Metallica and Katy Perry.

Musicians make money from playing live - even all electronic musicians like
Deadmau5. Most electronic musicians give their music away on Soundcloud and
then tour to make money.

This is the future of the industry. The problem is it just doesn't leave a lot
of room for record labels. This is something that no one will miss...

~~~
cobralibre
"Musicians make money from playing live... This is the future of the
industry."

I see this sentiment repeated often. I don't buy it. It seems like a better
way to put it is that if musicians are going to make money at all, then it
_must_ come from live performance. It certainly won't come from recordings,
because more and more consumers don't want to pay for recordings, regardless
of the practices of major labels, who have always been irrelevant to the
majority of practicing musicians anyway.

I have only anecdotal data to back myself up with, but of the independent
musicians I know, most of them lose money or make trivial earnings from live
performance. They do it because they find it rewarding, to be sure, but
they're not doing it for money. And touring is usually mutually exclusive with
a sustainable day job.

~~~
joeguilmette
Remember - music existed before money. Selling recorded performances is
relatively new - how long have records been around? I doubt the first users of
the tech in the early 1900s spent enough on records to support any type of
professional musician, let alone create Lady Gaga like stars.

Yet, somehow, there have been professional musicians for likely thousands of
years.

Record companies solved the distribution problem. The Internet proved them
obsolete and for the next few years they'll continue their death rattle until
they blossom into something that looks like Spotify (which is replacing radio
as well), or someone else will fill their shoes (as Spotify is doing today).

And then no one will care about programs designed to put lipstick on my 80gb
mp3 pig as iTunes does... Unless they roll out their own all you can eat
service :)

~~~
gurkendoktor
> music existed before money

?? Before money, artists still needed food and shelter...

> Yet, somehow, there have been professional musicians for likely thousands of
> years.

But does anyone really want to go back to the patronage system?

~~~
oofabz
I want to go back to the system where musicians are not rock stars trying to
sell you a product, they are ordinary people with a day job who enjoy making
and sharing music for their own entertainment.

~~~
yardie
We don't demand this of any other profession yet musicians should have a day
job and make music for the love of it? I want to go back to the system where
musicians were rewarded with money to put invest into their next project.
Maybe I'm old fashioned but I don't think Spotify nor Pandora are the answer.
My musician friends feel like it's the new Payola. They don't like to be on
there because the royalties on 1000 plays is not even worth the postage. Yet,
they can't afford not to be there because so many other musicians and
listeners are using it.

~~~
icebraining
_We don't demand this of any other profession yet musicians should have a day
job and make music for the love of it?_

Nobody is demanding anything of artists; it's artists (well, mostly labels,
but also some artists) that are demanding monopolies from society.

~~~
yardie
¿Que? I'm not even sure how to interpret this statement. Monopolies of what
exactly?

~~~
icebraining
Monopolies over the creations.

Thomas Jefferson's proposal for the Amendment that granted copyright and
patents was:

    
    
      Art. 9. Monopolies may be allowed to persons for their own productions
      in literature and their own inventions in the arts for a term
      not exceeding — years but for no longer term and no other purpose.
    

Madison, on the other hand, wrote:

    
    
      Monopolies, though in certain cases useful, ought to be granted with caution,
      and guarded with strictness against abuse. The Constitution of the United
      States has limited them to two cases--the authors of books, and of useful
      inventions (...)

------
aaronbrethorst
I took the liberty of extracting the interesting bits of this into a reusable
class, and tossed it up on GitHub:

<https://github.com/aaronbrethorst/ColorArt>

If I have the time this afternoon, I'll port it over to iOS, too. Or, if
someone feels inclined to do so, I welcome pull requests :)

Edit: and I transferred the repo over to Panic. I'm maintaining a fork so the
link above doesn't go dead.

------
jrajav
Isn't something like this done for the Windows >=7 taskbar icons too? Only for
a single color, though.

~~~
estel
Similarly Windows 8 can change the desktop theme's colour to match the
wallpaper.

------
cormullion
See also:

[http://stackoverflow.com/questions/13637892/how-does-the-
alg...](http://stackoverflow.com/questions/13637892/how-does-the-algorithm-to-
color-the-song-list-in-itunes-11-work)

------
superted
Good job "emulating" the iTunes algorithm. Request to op: It would have been
good to have some sample code inline in the article that illustrated the
algorithm. I know there's an Xcode project attached, but reading this on an
iPad has its limitations.

~~~
skeletonjelly
Some pictures would have helped too, considering not everyone has iTunes, and
it's an article about a visual feature. OP could have tried out the new Gist
to display code too

Edit: I meant pictures of the existing Apple implementation to see what they
were on about. I see the pictures of their algorithm but it makes no sense to
talk about the comparison when there's nothing to compare to

------
untog
Something similar to this was done at my old job, about four years ago. It
took images that were not square and padding out the shorter dimension with an
averaged colour from the edge. It looks like so:

<http://i.imgur.com/6WZCQ.png>

Sometimes it works well, other times it really doesn't. But it's an
interesting idea- and certainly not a new one (though Apple has certainly done
it better)

~~~
industrialwaste
What is this? A png for ants? ;)

~~~
untog
Hah, yes, it's a bad example. I couldn't remember how to grab a larger size,
but now I remember. Here's a 150px example:

<http://i.imgur.com/fjehG.jpg>

~~~
industrialwaste
ahh, much better! Thanks! I'm assuming the top section was the generated
content on it, correct?

~~~
untog
And the bottom. That you didn't notice is a testament to how well it works...
sometimes :)

------
windsurfer
As someone without iTunes, what does iTunes do now? There are no
screenshots/videos in this article.

~~~
duopixel
The album view displays a color scheme based on the album artwork. The results
vary from good to great, I haven't encountered any poor examples of it's
application.

You can see an example here:
[http://daringfireball.net/misc/2012/12/itunes-11-expanded-
vi...](http://daringfireball.net/misc/2012/12/itunes-11-expanded-view-
frank.jpg)

The text, background and highlight colors are based on on the album artwork.

~~~
evoxed
I see plenty of poor ones, but you could attribute at least half of those
cases to all the 70s and 80s prog/psych/metal I've got now.

------
bpopov
This reminds of the work @matasar and @attaboy did back in 2007 on Dabble DB:
<http://blog.dabbledb.com/2007/04/white--or-green.html>

------
gaidica
We have been using this technique for a while to go from logo-to-brand, I have
a demo and API for it: <http://landr.co/brandr/>

~~~
skeletonjelly
That's really cool! Has this been featured on HN before?

~~~
gaidica
Nope!

~~~
skeletonjelly
This would be a timely submission! :)

------
beshrkayali
It's a pretty cool new feature.

Something similar could be done in a browser with
<http://lokeshdhakar.com/projects/color-thief/>.

------
msutherl
Stefan Sagmeister's logo/branding for Casa da Música takes this idea in
reverse – the logo colors are determined by the surrounding imagery:
<http://www.sagmeister.com/work/featured#/node/192>

------
gruseom
What's a good music player for OS X? I just want something simple that plays
mp3s etc. and helps me manage my collection. Even before this redesign, iTunes
was too bossy for me to like it. Is there something like Winamp when it was
good?

~~~
ericdykstra
Check out Songbird at <http://getsongbird.com/>

I prefer foobar2000 on Windows for a pure, unadulterated, customizable music
player, but Songbird is the best player I've found on OS X. It is fast, plays
music, and has a plugin for last.fm, which is everything I require.

~~~
veridies
I've had the opposite experience; while with a fairly small library Songbird
is fine, with mine (~700GB, lossless) it's incredibly slow and prone to
crashing. Last time I tried it was about six months ago with no improvement.

------
mcgwiz
As noted by jrajav, since Vista, the Windows taskbar features a single-color
version of this, inferred from application icon.

Additionally, the New Tab page in Chrome has exhibited this (inferred from
favicon) for as long as I can remember.

------
batiudrami
Since Windows 7, hovering over an open application in the taskbar has done a
similar thing. I sometimes wonder how it almost always manages to pick the
dominant colour, even if it isn't necessarily the most common one.

------
tambourine_man
Anyone noticed the lag between typing and results being displayed? It's
infuriating, instant search results used to be the hallmark of iTunes.

------
adamzegelin
I always enjoy reading Panic's blog. They always have something interesting to
say.

