Colour schemes

The plugin themes (extra/themes, if the repository was added as extra) defines colour schemes for luish’s syntax highlighting, completion menu and suggestions. It needs luish 0.7.0 or later. Each scheme comes in a pair, for dark and light backgrounds:

Dark

Light

Colours

ansi-dark

ansi-light

the terminal’s own 16, so they follow its palette

solarized-dark

solarized-light

Solarized

gruvbox-dark

gruvbox-light

gruvbox

catppuccin-mocha

catppuccin-latte

Catppuccin

tokyonight-night

tokyonight-day

Tokyo Night

Here they are on a few command lines, each drawn with the styles that luish resolves for it, with a completion menu and a suggestion:

Each scheme other than ansi also sets the terminal's background and text colour (unless terminal-colors = false), and is drawn here on them; each terminal says which. The ansi pair sets none, and is drawn with the Tango palette on backgrounds chosen for this page: in your terminal it takes the terminal's colours. Hover over a word to see its role. The palettes are other people's; themes/README.md says where each comes from, under which license.

ansi: The terminal's own 16 colours: they follow whatever palette it has, and need no 24-bit colour. Drawn here with the Tango palette (public domain).

ansi-darkon #1a1b1e, text #d3d7cf
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics
ansi-lighton #fbfbf8, text #2e3436
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics

solarized: The same eight accents on both backgrounds; only the greys change. Soft by design. Colours: Solarized, by Ethan Schoonover (MIT).

solarized-darkon #002b36, text #839496
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics
solarized-lighton #fdf6e3, text #657b83
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics

gruvbox: Bright accents on the dark background, faded ones on the light. Keywords red, as gruvbox has them. Colours: gruvbox, by Pavel Pertsev (MIT/X11).

gruvbox-darkon #282828, text #ebdbb2
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics
gruvbox-lighton #fbf1c7, text #3c3836
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics

catppuccin: Mocha and Latte, after Catppuccin's style guide. Latte trades a few pastels for darker colours that read on its background. Colours: Catppuccin's palette (MIT).

catppuccin-mochaon #1e1e2e, text #cdd6f4
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics
catppuccin-latteon #eff1f5, text #4c4f69
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics

tokyonight: Night and Day. Options take the colour of parameters, special variables that of built-in ones. Colours: tokyonight.nvim, by Folke Lemaitre (Apache-2.0), after Enkia's Tokyo Night (MIT).

tokyonight-nighton #1a1b26, text #c0caf5
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics
tokyonight-dayon #e1e2e7, text #3760bf
$ # map the reads of each sample, then sort them
$ for s in *.fq.gz; do bwa mem -t 8 ref.fa "$s" > "${s%.fq.gz}.sam"; done
$ sudo LC_ALL=C sort -k2,2 counts.tsv | topn 20 2>/dev/null
$ if [[ -z $OUTDIR ]]; then echo 'no output dir:' "using \$HOME=$HOME"; fi
$ ll ~/data/{raw,clean}/*.bam && echo $(date +%F) $? ${runs[1]} $UID
$ samtoools view in.bam "chr1:100-200
$ samtools sort -@ 4 -o sorted.bam in.bam
sortsort alignment file
splitsplit a file by read group
statscomprehensive statistics

Choosing one

Loading the plugin only makes the schemes available. Choose a pair in config.toml, and luish takes the one that fits the terminal’s background, which it asks the terminal for (or reads from $LUISH_BACKGROUND):

[plugins.enabled]
extra.themes = "*"

[style]
colorscheme = { dark = "tokyonight-night", light = "tokyonight-day" }

style -c lists the schemes, and style -c NAME (or style -c DARK LIGHT) tries one in the running shell. Styles set in [style] or with style NAME VALUE still go over the scheme’s.

What the colours say

The schemes differ in their colours, not in what they mark:

  • commands have one colour, whatever their kind: functions are bold, aliases italic, and unknown commands bold red; sudo, env, exec and the other commands that run a command are italic in the colour of keywords;

  • keywords are bold, in a colour of their own;

  • options have a colour of their own; other arguments are left in the terminal’s text colour;

  • strings have one colour; escapes, $(...) and the expansions (~, {a,b}, *) stand out from it;

  • variables have one colour, which the NAME= of an assignment shares: exported ones are bold, arrays italic, special and read-only ones ($?, $1) in a second colour, and unset ones italic red;

  • operators and redirections are bold; the file descriptors of redirections are in the colour of numbers;

  • comments are italic, in the palette’s colour for comments, which suggestions and descriptions in the menu share;

  • syntax errors are underlined red, and with setopt highlight.paths, files are underlined;

  • in the output of plugin, names are bold, what worked green, what changed (or can) yellow, warnings orange where the palette has it, errors bold red, and details in the colour of the menu’s descriptions.

Colours and terminals

The schemes other than ansi write their palette’s colours as #rrggbb, which needs a terminal with 24-bit colour (most have it). They also set the terminal’s own colours while they are in use: its background, text and cursor colours, and the 16 colours that other programs use (ls --color, git diff), as the palette’s authors give them for terminals. luish puts back the terminal’s colours when the scheme is no longer in use and when it exits (see luish’s The terminal’s colours); the terminal must accept the colours (xterm, GNOME Terminal and other VTE ones, kitty, foot, Alacritty, WezTerm and iTerm2 do; tmux and screen may not pass them on). To keep your terminal’s own colours, with the schemes’ colours only on the command line:

[style]
terminal-colors = false

The dark or light member of a pair is still chosen by the terminal’s own background, before the scheme changes it.

ansi-dark and ansi-light set none of the terminal’s colours, and use its 16 colours, so they follow whatever palette it has; ansi-light leaves out yellow and the bright colours, which are hard to read on a light background.

Solarized and Catppuccin Latte are soft palettes, with colours that contrast less with the background than the others’. catppuccin-latte departs from Catppuccin’s style guide where its colours are hardest to read: variables are teal rather than yellow, escapes maroon rather than pink, and operators in the text colour.

Where the colours come from

The palettes are other people’s work, and every #rrggbb colour in these schemes is one of theirs. What luish-extra adds is which colour marks which part of a command line, and the changes to catppuccin-latte above. Their licenses allow this; copies are in themes/LICENSES, and themes/README.md has the details.

Schemes

Palette, by

License

solarized-*

Solarized, by Ethan Schoonover

MIT

gruvbox-*

gruvbox, by Pavel Pertsev

MIT/X11 (as its README says; it has no license file)

catppuccin-*

Catppuccin’s Mocha and Latte

MIT

tokyonight-*

the night and day styles of tokyonight.nvim, by Folke Lemaitre, ported from Enkia’s Tokyo Night

Apache-2.0; the original MIT

The ansi pair uses only the terminal’s own colours. The preview above draws it with the Tango palette, which is in the public domain. None of these projects endorses luish-extra; the schemes carry their palettes’ names to say where the colours come from.