Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Themes

Every theme in Vix™ is a JSON theme (see crates/vix-theme/spec/index.md). A set ships bundled in the binary — including Dark (the default) and Light — and you can add your own. Pick a theme live in View → Theme… (↑↓ to preview, Enter to apply, Esc to cancel). The chosen theme’s name is saved to the theme setting.

Built-in themes

Dark (default, a soft [215,215,215] on [40,40,40]) and Light (its inverse) are ordinary bundled themes — tui/themes/dark.json and tui/themes/light.json — with no special treatment. Edit those files, or install a same-named theme of your own, to change them.

Following the terminal (theme = "auto")

Set theme = "auto" and Vix picks theme_light or theme_dark (defaults "light" and "dark") to match your terminal. At startup it asks the terminal for its background color (OSC 11) and waits up to 200 ms for the answer; if the terminal doesn’t answer it reads COLORFGBG, and if that is missing too it uses theme_dark. It asks once, at startup, so changing your terminal’s appearance mid-session takes effect on the next launch. Nothing is asked unless theme is "auto".

Terminals without truecolor

Themes are written in RGB. On a terminal that can’t show RGB, Vix converts every color to the nearest one the terminal has: the xterm 256-color palette, or the 16 ANSI colors. It decides from COLORTERM, TERM and TERM_PROGRAM (for example COLORTERM=truecolor keeps RGB, macOS Terminal.app gets 256 colors, the Linux console 16) without asking the terminal anything. vix --doctor shows the depth it chose. If a truecolor terminal is detected wrongly, set COLORTERM=truecolor. See crates/vix-theme/spec/index.md.

Custom themes

Themes are JSON files in the themes directory:

~/.config/vix/themes/<name>.json     # Linux (and platform equivalents)

Ready-made themes

A set of themes is bundled into the binary (from the repo’s tui/themes/ directory) and appears in View → Theme… automatically — no installation needed: Dark, Light, Darker, Darkest, Lighter, Lightest, Turbo, Solarized Dark, Solarized Light, Dracula, Nord, Gruvbox Dark, Monokai, One Dark, Tokyo Night, Catppuccin Mocha, High Contrast (WCAG AA, 11:1 or better on every text color), and four single-color themes: Phosphor Green Monochrome, Phosphor Amber Monochrome, Phosphor White Monochrome and Safelight Red Monochrome. Each draws the whole screen in one color on black, with no syntax colors and a reverse-video cursor. Plus every theme generated from a bundled base16 palette, prefixed Base16 … in the same View → Theme… list (see crates/vix-base16/spec/index.md).

A theme you install in your own themes directory overrides a bundled one of the same name, so you can customize any of them by dropping an edited copy there.

Contrast. The default Dark and Light themes meet WCAG AA: every text color is at least 4.5:1 against its background, and the cursor at least 3:1. Other themes, bundled or your own, are not held to that: some are chosen for their look (the single-color themes, Turbo, the base16 palettes), and Vix loads and applies any theme you pick without checking it. For the most contrast, pick High Contrast.

Writing your own

Each file defines per-region colors. Any region, channel, or section you omit falls back to the primary editor color, so a partial theme is valid. Colors are [R, G, B] arrays, each channel 0–255.

{
  "name": "my-theme",
  "menu-bar":   { "foreground": [212, 212, 212], "background": [30, 30, 30] },
  "status-bar": { "foreground": [212, 212, 212], "background": [30, 30, 30] },
  "left-dock":  { "foreground": [212, 212, 212], "background": [30, 30, 30] },
  "right-dock": { "foreground": [212, 212, 212], "background": [30, 30, 30] },
  "editor": {
    "foreground":  [212, 212, 212],
    "background":  [30, 30, 30],
    "cursor":      [82, 139, 255],
    "font-style":  "normal",
    "font-weight": "normal"
  },
  "syntax": {
    "keyword": [86, 156, 214],
    "string":  [206, 145, 120],
    "comment": [106, 153, 85]
  }
}

Regions

KeyRegion
menu-barThe top menu bar.
status-barThe bottom status bar.
left-dockThe file explorer drawer.
right-dockThe message drawer.
editorThe center text area.

Each region takes foreground and background, and optional font attributes:

FieldValuesDefault
foreground[R, G, B]theme fg
background[R, G, B]theme bg
font-style"normal" or "italic""normal"
font-weight"normal" or "bold""normal"

editor additionally takes a cursor color (drawn as the block-cursor cell). The optional syntax block colors Tree-sitter tokens — keyword, string, comment, and number are recognized.

The bundled Dark/Light themes use no italic or bold; those effects appear only under a theme that opts in.

Selecting a custom theme

Drop a file in the themes directory and reopen View → Theme…: it appears in the list after Dark and Light. Selecting it saves its name to the theme setting, so it is restored on the next launch. If a saved custom theme name can no longer be found, Vix falls back to Dark.

Theme editor

View → Edit Theme… (T202) opens an in-app editor over a copy of the active theme: 15 rows, one per color slot, each showing its current #RRGGBB value. ↑/↓ (or the mouse) move the highlight; Enter opens the same X11 color picker Tools → X11 Colors uses, so choosing a slot’s new color is browsing a named-color table, not typing hex by hand. Every change is applied live, so the real UI reflects the edit immediately. Esc closes the editor and reverts to the theme that was active before you opened it, if you haven’t saved. Ctrl+S prompts for a name and writes the result to ~/.config/vix/themes/<name>.json, then makes it the active theme — the same outcome as picking any other theme from View → Theme….

See crates/vix-theme-editor-panel/spec/index.md for the implementation.

See also

  • crates/vix-theme/spec/index.md — the theme specification (source of truth).
  • configuration.md — the theme setting and file locations.

Vix™ and Vix IDE™ are trademarks.