color-thief

Get the dominant color or color palette from an image.

colorpalettesamplingimagepicturephotocanvas

http://lokeshdhakar.com/projects/color-thief/