How to make a color palette from an image ordered by frequence

Doesn’t matter. It should work with any image (i.e. collection of pixels).

Essentially, like I mention in the top post, I could already get this to work by first applying color quantization to an image and then extracting the most common colours (by checking every pixel).

For that particular image, if I apply color reduction (quantization) with imagemagick to 6 colours, I get:

Which, as a palette, translates to #CAC4CB, #363B33, #739893, #A74646, #BB54B7, #44AB46

It should be customisable.

I’m not sure. Probably not.