A template is an app's config file with color placeholders in it.
Template Syntax#
foreground {foreground}
background {background}
cursor {cursor}
Example: Kitty Terminal#
cursor {cursor}
cursor_text_color {background}
foreground {foreground}
background {background}
selection_foreground {on_surface}
selection_background {editor_selection}
url_color {accent}
color0 {term0}
color1 {term1}
color2 {term2}
color3 {term3}
color4 {term4}
color5 {term5}
color6 {term6}
color7 {term7}
color8 {term8}
color9 {term9}
color10 {term10}
color11 {term11}
color12 {term12}
color13 {term13}
color14 {term14}
color15 {term15}
Use term0-term15 for a terminal's 16-color palette, not base00-base0F — the two use a different color ordering. base00-base0F follows the base16 convention (base00-base07 are a background ramp, base08-base0F are the accent hues), while term0-term15 are the actual ANSI colors in terminal order.
Add a specifier to a key to get the color in another format.
| Placeholder |
Format |
Description |
{color} |
#RRGGBB |
Default hex |
{color.hex} |
#RRGGBB |
Full hex with # |
{color.hex_stripped} |
RRGGBB |
Hex without # |
{color.hexa} |
#RRGGBBAA |
Hex with alpha |
{color.hexa_stripped} |
RRGGBBAA |
Hex + alpha, no # |
| Placeholder |
Format |
Description |
{color.rgb} |
rgb(r, g, b) |
RGB function |
{color.r} |
0-255 |
Red component |
{color.g} |
0-255 |
Green component |
{color.b} |
0-255 |
Blue component |
| Placeholder |
Format |
Description |
{color.rgba} |
rgba(r, g, b, a) |
RGBA function |
{color.a} |
0.0-1.0 |
Alpha component |
| Placeholder |
Format |
Description |
{color.hsl} |
hsl(h, s, l) |
HSL function |
{color.h} |
0-360 |
Hue |
{color.s} |
0.0-1.0 |
Saturation |
{color.l} |
0.0-1.0 |
Lightness |
| Placeholder |
Format |
Description |
{color.hsla} |
hsla(h, s, l, a) |
HSLA function |
{color.a} |
0.0-1.0 |
Alpha component |