Color Variables
Every theme must define these 19 standard color variables. Values are hex colors without the # prefix.
Standard variables
| Variable | Description |
|---|---|
background | Primary background color |
foreground | Primary text/foreground color |
cursor | Cursor color |
selection-background | Background of selected text |
selection-foreground | Foreground of selected text |
ANSI colors
Each ANSI color has a normal and highlight (-hg) variant:
| Normal | Highlight | ANSI code |
|---|---|---|
black | black-hg | 0 / 8 |
red | red-hg | 1 / 9 |
green | green-hg | 2 / 10 |
yellow | yellow-hg | 3 / 11 |
blue | blue-hg | 4 / 12 |
magenta | magenta-hg | 5 / 13 |
cyan | cyan-hg | 6 / 14 |
white | white-hg | 7 / 15 |
Format rules
- Colors are hex values without
#:ff5555, not#ff5555 - Add the appropriate prefix in your patterns:
#<[red]>→#ff5555(CSS, kitty, etc.)0x<[red]>→0xff5555(Alacritty legacy)rgba(<[red]>ff)→rgba(ff5555ff)(Hyprland)
- All 19 variables are required in every theme
Example
[colors]background = '1e1f28'foreground = 'f8f8f2'cursor = 'bbbbbb'selection-background = '44475a'selection-foreground = '1e1f28'black = '000000'black-hg = '545454'red = 'ff5555'red-hg = 'ff5454'green = '50fa7b'green-hg = '50fa7b'yellow = 'f0fa8b'yellow-hg = 'f0fa8b'blue = 'bd92f8'blue-hg = 'bd92f8'magenta = 'ff78c5'magenta-hg = 'ff78c5'cyan = '8ae9fc'cyan-hg = '8ae9fc'white = 'bbbbbb'white-hg = 'ffffff'Previewing colors
To see a theme’s colors rendered in your terminal:
gtheme theme colors <theme>This displays each color with its hex value, making it easy to verify your theme looks correct.