Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.72 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.72 KB

ColorQuantization.jl

Stable Dev Build Status Aqua QA Coverage

A Julia package to generate color palettes from images.

Installation

To install this package and its dependencies, open the Julia REPL and run

julia> ]add ColorQuantization

Examples

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.

Related packages

ColorSchemeTools.jl provides extract to generate weighted colorschemes from images using K-means clustering.