Hacker News new | ask | show | jobs
by sorghum 5273 days ago
You can do it like this with ImageMagick on the command line. This will quantize the image to 8 colors and list them in descending order of occurance:

  convert image.jpg -resize 400x400 -format %c -dither None -quantize LAB -colors 8 -depth 8 histogram:info:- | sort -r
1 comments

Sorting should be done with sort -r -n -t :