You can build a similar thing server side using Imagemagick. It has a great suite of tools for doing image quantization and other manipulations.
convert image.jpg -resize 400x400 -format %c -dither None -quantize LAB -colors 8 -depth 8 histogram:info:- | sort -r