Searching for books by the colour of the cover

Iman and Jonathan’s comments on my previous post got me wondering how accurate searching by the average colour of a book cover would actually be…

Here’s a quick & dirty prototype:


It’s so quick & dirty that you’ll need to enter a hex value for the colour you want to search for (e.g. FF8C00 or 9370D8) — if you’re not that familiar with the hex values, then try this page.

Alternatively, just hit the “pick random colour” button to make something up!

There are currently around 12,000 book covers that it knows the average colour for, but I’ll keep adding more once I’ve finished indexing them.

  1. Paul Stainthorp said:

    That is just the single most off-the-wall and simultaneously useful thing I’ve seen in a long time.

    Now, can you cross-index that with subject, so that I can find that book on Perl scripting. You know, the PURPLE one …

  2. Dave – just thinking about this – do you know any web services that you send an ISBN to and you get back the color of the cover? I have an application for that right away (take a snapshot of new books in the library, and sort them by color).

  3. Ed — I’m not aware of one, but give me an hour and I’ll see what I can come up with! đŸ™‚

  4. Ok — it’s definitely beta and potentially cruddy, but here you go:

    The first will return an XML response and the second (which is just for fun) displays an HTML page.

    You can include optional “height” and “width” parameters (which must be numbers between 1 and 50) and this will return the pixel averages if the cover is resampled to that size – e.g.

    I’m making no promises as to how stable the scripts are and, if they cause any problems on the server, I might have to remove them.

    As we Amazon’s Web Services, both the XML and HTML outputs contain links to the product page on Amazon (as per the Amazon T&Cs).

    Have fun!

  5. OK Dave, I got it working here – wrapped it in a script at

    which you can run as
    % 0545010225

    It doesn’t do anything more than the minimum, just wraps the interface you have in a script.

    The next bit I’m stuck on is more color theory than anything else. How do you sort RGB values into a rainbow? Obviously sorting on the hex code gives you the wrong answer (it sorts by % red), and there’s some color calculus to arrange those numbers along a pleasing line, but my initial searches stumped me. I found formulas for “hue” and “luminance” and will try those.

  6. One more color space to consider:*a*b

    which looks like it might shelve the books more nicely – the math to convert from RGB to LAB is a bit tricker but still looks straightforward once you make an assumption or two.

  7. phrebh said:

    This is great! I mean, the time and effort that must have gone into an essentially useless, although really cool, tool really speaks to my own, vast wastes of time.

  8. heh heh — as Marguerite Duras once said, “The best way to fill time is to waste it.”

  9. Venus Goody said:

    This is an excellent work.

    can I access the catalogued iformation of a particular book from the Amazon’s book collection, when I search on its ISBN No.?

    Please guide,


  10. Alex said:

    Wonderful idea – I sort my own books like this – I thought it was unusual until I was sitting in the rare books room of a university library next to a distinguished manuscripts scholar. He had ordered a book and it hadn’t arrived. He collared the assistant and pointed out that the book was easy to find as it had a red cover. Some time later the book arrived. Without a red cover. Instead of being grateful, the scholar observed, in dissatistisied tones ‘I see, you only have the green edition’…

  11. Anita said:

    pitty it ain’t working anymore….

  12. Dave Pattern said:

    Sorry, Anita — it’s something that was set up 4 years ago for a bit of fun!

  13. Jennifer said:

    Has two children standing in front of a manchin or a fancy house I think the whole cover has a bluish tent to it. I also think think the children look a little dirty and maybe the boy is holding a teddy and I know is shorter than the girl. Its not scary or about forighn places. the kids are of a white race.

  14. Jennifer said:


  15. Jennifer said:

    I dont have E-mail please type book on this website. Is this website still even used? Or do you not want to help? PLease find the book!

  16. Dave Pattern said:

    Hi Jennifer

    Sorry, this is a 4 year old blog post and I don’t think you’ll get an answer from anyone.

  17. Jennifer said:

    Thanks Dave.
    I thought it wasnt used any more.
    Do you know of anything else I can use?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: