This javascript will help you extract colors from any picture you input. By default it gets a max of 24 colors but you can easily change the ammount.

It also displays the color code in HEX values and you can also copy it to clipboard fast or convert the HEX to RGB.

You can implement it in any of your projects and the code it's nicely commented for a better understanding of the steps.

The image is processed locally so it won't be uploaded.

Choose one or more images by or drag and drop images anywhere on the page:

or drag and drop image