Paletter is a CLI app and library to extract a color palette from an image through clustering (k-Means)
Example output:
To install paletter just use:
$ go get -u -v github.com/Baldomo/paletter
To install the CLI app use:
$ go install -v github.com/Baldomo/paletter/cmd/paletter
Usage: paletter [OPTIONS] <IMAGE>
Flags:
-colors int
Number of colors to extract from the image (default 7)
-html
Output an html page
-out string
Set output file name/path
-png
Output a png image (default true)
The CLI app outputs png
images of resolution dependent on the source image (see genimage.go
for calculations), with the extracted palette ordered by lightness from left to right
- Paletter uses the CIE L*a*b* color space both for the simplicity of its representation and it being device-indipendent
- The k-Means implementation included in paletter is the naive one (muesli/kmeans)