This project uses cluster recognition on a sample of 300 pixels in an image to reduce the number of colors in said image.
mean-color-filter image.png cutFactor # replace cutFactor with a number between 0 and 1.8ish
make sure you have nix installed.
cabal new-build or
cabal v1-buildgt might also work in a pinch.