Color Thief
Grab the color palette from an image using just Javascript
...Color is returned as an array of three integers representing red, green, and blue values. When called in the browser, the image argument expects an HTML image element, not a URL. When run in Node, this argument expects a path to the image. quality is an optional argument that must be an Integer of value 1 or greater, and defaults to 10. The number determines how many pixels are skipped before the next one is sampled. We rarely need to sample every single pixel in the image to get good results. The bigger the number, the faster a value will be returned. ...