A Julia package to generate color palettes from images.
To install this package and its dependencies, open the Julia REPL and run
julia> ]add ColorQuantization
To extract a color palette from an image, call quantize
with a quantization method of your choice.
using ColorQuantization
using TestImages
img = testimage("peppers")
quantize(img, KMeansQuantization(256)) # quantize to 256 colors
quantize(img, UniformQuantization(8)) # quantize to an 8x8x8 grid
The generated color schemes can be viewed in the documentation.
ColorSchemeTools.jl provides extract
to generate weighted colorschemes from images using K-means clustering.