Generate color schemes from a background color, accent color, and optional foreground color
Go to file
2021-09-14 12:53:50 -05:00
acid16.py last 8 colors now vary in luminance to make them more differentiable 2021-09-14 12:53:50 -05:00
README.md last 8 colors now vary in luminance to make them more differentiable 2021-09-14 12:53:50 -05:00

acid16

It makes base16 schemes. Pass a background color, an accent color, and optionally a foreground text color, and out comes a color scheme.

Color arguments are in the form of "hue,sat,lum" for background and "hue,sat" for the other two. All values must be numbers between 0.0 and 1.0 (you're welcome to try other values, just don't be shocked if it breaks). Also, keep in mind that luminance here is relative luminance, or the color's brightness as perceived by the human eye. This is different from the usual HSL space.

The script will do its best to make sure everything is readable. It tries to keep a contrast ratio of 7:1 between the foreground and background colors, while trying to stay above 3:1 between foreground and highlight, the "rainbow" colors (i.e. the last 8 colors) and highlight, and the "dark" foreground and background. Usually it does a good job. But it tends not to like a background luminance that hovers around 0.3, that's when stuff gets to be an eyesore.

For the last 8 colors, you can make them blend with the background hue by passing -r (amount), the amount being between 0.0 and 1.0. 0.0 means no blending, 1.0 makes them all the same hue.