cologen

The simple color scheme configuration generator, inspired by base16-builder.

Install

Usage

```plain Usage) [TEMPLATE] | cologen [SCHEME] > [OUTPUT]

[TEMPLATE]: Template configuration file for target.
            It must be input at stdin.
[SCHEME]: Path of color scheme file. (YAML format)
[OUTPUT]: The generated configuration is printed at stdout.

Example) cat $XDGCONFIGHOME/cologen/templates/rofi.template \ | cologen $XDGCONFIGHOME/cologen/schemes/gruvbox-dark.yaml \

$XDGCONFIGHOME/rofi/color.rasi

```

Color scheme

The color scheme file follows the YAML format. see below example, or example/scheme.yaml.

The example is a color scheme from gruvbox

```yaml name: "gruvbox-dark" color: # Monochromes grey0: [ 0x28, 0x28, 0x28 ] # bg0 grey1: [ 0x3C, 0x38, 0x36 ] # bg1 grey2: [ 0x66, 0x5C, 0x54 ] # bg3 grey3: [ 0xBD, 0xAE, 0x93 ] # fg3 grey4: [ 0xEB, 0xDB, 0xB2 ] # fg1 grey5: [ 0xFB, 0xF1, 0xC7 ] # fg0

# Chromatics red: [ 0xFB, 0x49, 0x34 ] # red (bold) green: [ 0xB8, 0xBB, 0x26 ] # green (bold) yellow: [ 0xFA, 0xBD, 0x2F ] # yellow (bold) blue: [ 0x83, 0xA5, 0x98 ] # blue (bold) magenta: [ 0xD3, 0x86, 0x9B ] # purple (bold) cyan: [ 0x8E, 0xC0, 0x7C ] # aqua (bold)

```

cologen has not the standard or guideline for color naming. it just replaces the substitutes in the template to the actual color codes based on the color name.

Formats

Template

```css /* color config example for rofi / * { / Monochrome */ grey0: @[grey0:#%xR%xG%xB]; grey1: @[grey1:#%xR%xG%xB]; grey2: @[grey2:#%xR%xG%xB]; grey3: @[grey3:#%xR%xG%xB]; grey4: @[grey4:#%xR%xG%xB]; grey5: @[grey5:#%xR%xG%xB];

/* Chromatics */
red: @[red:#%xR%xG%xB];
green: @[green:#%xR%xG%xB];
yellow: @[yellow:#%xR%xG%xB];
blue: @[blue:#%xR%xG%xB];
magenta: @[magenta:#%xR%xG%xB];
cyan: @[cyan:#%xR%xG%xB];

/* Special Purpose */
empty: rgba(0, 0, 0, 0);
bg: @[grey0:rgba(%dR, %dG, %dB, %.A)];
fg: @[grey4:#%xR%xG%xB];
fgbold: bold underline @[grey5:#%xR%xG%xB];

} ```

Color name

Color code format