Skip to main content

Module theme

Module theme 

Source
Expand description

Truecolor theme for the TUI (spec §10/§11): maps worktree and UI state to ratatui Styles.

All color is gated behind a single enabled flag — resolved once from the --color flag, NO_COLOR, and ui.color (spec §11 precedence) — so that disabling color collapses cleanly to the monochrome look (only the structural DIM/BOLD/REVERSED modifiers remain). The concrete colors come from a Palette: a built-in ThemePreset (One-Dark by default) with per-color overrides applied on top ([ui.theme], spec §11). Each palette is fixed 24-bit RGB, so it renders consistently regardless of the terminal’s own theme.

Structs§

Palette
The set of semantic colors a Theme draws from. Every field is a concrete 24-bit (or named) Color; Theme decides where each is applied.
Theme
A resolved theme. Construct with Theme::new (One-Dark) or Theme::with_palette; every accessor returns a ratatui Style that is plain (Style::default) when color is disabled.

Enums§

ThemePreset
A built-in base palette, selected by ui.theme.preset (spec §11).