The arrival of modern colour declarations in CSS (such as oklch) and the support of wider colour gamuts like P3 means the sort of automated palete generation Palegen was made for is nowmuch less useful.
CLI based automated CSS colour palette generator. (Pronounced "pal-ee-jen".)
Palegen is a command line application that accepts a single colour, generates a harmonius palette and outputs the colours to a file as CSS variables.
Inspired by Javascript based Palx, Palegen (for the moment) lacks some of Palx's sophistication.
Palegen has one advantage in that it runs on the command line and can be part of an automated workflow (but note that output colours may shift slightly between versions).
Written in Golang Palegen uses the go-colorful library for colour conversions.
Palegen reads from a palegen.ini configuration file, see palegen.ini for a commented example. Currently you define a single input color and a destination for the output CSS. Then run palegen from the directory containing the ini file.
palegen
Colours are output in hsl format as CSS variables to a file named 'colors.css'. Example CSS output from the above command and default palegen.ini is here.
By default colors.css is output to the example folder, you can view the results by opening palegen.html in a browser. An example screenshot of that page is here.
Using go get to download, compile and install will give your the very latest code:
go get github.com/adrinux/palegen
It's more sensible to check out a specific version and compile it yourself:
git clone https://github.com/adrinux/palegen.git
cd palegen
git checkout tags/0.2.0
go build
And copy the resulting binary somewhere in your path (check it's executable).
(At some point I should set up binary releases via github...)
- Colour Names: For certain input colours the names of output colours can seem a little off. Red may be perceptually orange, yellow perceptually green. See issue #4
- Limited to hsl() CSS output. See #8