http://tylerneylon.com/a/imghist/ (and source) https://github.com/tylerneylon/imghist/blob/master/imghist.p...
That also includes color histograms.
Thoughts on actually using this:
* If a human is using the color output, it's fun to weigh the colors by cluster sizes. * To find human-perspective dominant colors, it helps to throw out very-light/dark pixels. * Dribbble does a very good job of this - look at any of their individual photo pages. * For production use, C would be much more appropriate at solving this problem (but python is more fun to use).
Another cool application of color analysis like this:
http://www.vijayp.ca/blog/2012/06/colours-in-movie-posters-s...