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:
https://library.hud.ac.uk/perl/colour.pl
colourcover
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.

25 thoughts on “Searching for books by the colour of the cover”

  1. 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. Ok — it’s definitely beta and potentially cruddy, but here you go:
    https://library.hud.ac.uk/balti/bookcolor.pl?isbn=0545010225
    https://library.hud.ac.uk/balti/bookcolor2.pl?isbn=0545010225
    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.
    https://library.hud.ac.uk/balti/bookcolor.pl?isbn=0545010225&height=40&width=27
    https://library.hud.ac.uk/balti/bookcolor2.pl?isbn=0545010225&height=40&width=27
    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!

  4. OK Dave, I got it working here – wrapped it in a script at
    http://www.superpatron.com/wall-of-books/book-color.sh
    which you can run as
    % book-color.sh 0545010225
    A47145
    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.

  5. 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.

  6. 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,
    Venus

  7. 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’…

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

  9. 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.

  10. 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!

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

Comments are closed.