Node.js image color palette extraction with node-canvas