User guide / Themes

Terminal ANSI colours

Development reference · View source

Terminal panes, frozen review and terminal previews use the active theme’s sixteen ANSI colours by default. Switching themes or toggling editor.terminal_theme_colors in Space o o recolours existing output immediately. Set it to false to use the outer terminal’s palette instead. Only indices 0–15 are remapped; indices 16–255 and explicit RGB retain the program’s colours, subject to the client’s colour depth.

Custom themes can override any of these slots under terminal: black, red, green, yellow, blue, magenta, cyan, white, and each name prefixed with bright_. Unknown names and invalid colours are errors. For example, inside a theme definition:

terminal:
  red: "#e65c57"
  bright_red: "#f08a92"

Omitted normal slots use muted, error, change_added, warning, directory, change_modified, accent, and foreground, respectively. Omitted bright slots take those roles a further 12% toward white on dark grounds or black on light grounds. Derived colours are moved toward the higher-contrast black or white extreme to reach at least 3:1 on the theme ground; explicit overrides are used exactly. An override of a normal slot does not change an omitted bright slot.

Bundled third-party themes start from their upstream terminal palettes; Atom One Light uses its official syntax hues. Low-contrast entries are moved toward white or black to reach 3:1 on the theme background, including neutral slots upstream intended as backgrounds. Runyte’s original themes derive their palettes from the roles above. Upstream hues are retained, while Runyte’s shared Git roles remain unchanged; ANSI green and Git added marks need not have identical RGB values.

A reset background still uses the theme palette. Its actual ground is unknown, so contrast cannot be guaranteed; disable the setting to defer to the outer terminal’s palette. Named colour and reset overrides retain their normal terminal-owned meaning. OSC 4 palette queries and setters are ignored.