A node.js port of lokesh color-thief library - https://github.com/lokesh/color-thief