Skip to main content

Module theme

Module theme 

Source
Expand description

The ratatui adapter of the theme (scope::display::theme).

It only translates: each role’s tone becomes a ratatui Style, and this file is the one TUI file that names a ratatui color. Only the 16 named ANSI colors are used, so the terminal’s own palette decides the exact shade on dark and light themes. No code here checks whether color is on: plain::finish_frame strips every fg and bg color from a frame when it is off. Modifiers (bold, dim, reverse) stay, and each state also shows a word or glyph, so no meaning depends on color. The contrast guard (tests/tui_contrast.rs) keeps other files from naming a color.

Structs§

ColorPalette
Named color palette derived from a ColorScheme.

Enums§

PaneState
What the output pane is doing. It sets the rule color and the state word.

Constants§

ACCENT
Title, idle pane rule, prompt scope, status values, palette names.
DEFAULT_COLOR
The terminal’s own default color: what a cell shows with color off.
ERR
Failed pane rule and ✗ Failed in N.Ns. (the footer adds bold).
INFO
The ℹ glyph on notes.
KEY
Key names in hints and help, and the prompt :<chain>.
LINK
A URL in a link row.
MATCH
A search match.
OK
✓ Done in N.Ns.
SECONDARY
Secondary text: the default foreground, dimmed. DIM is a modifier, so it also holds under NO_COLOR.
SELECTED
The selected palette or menu row.
WARN
Running pane rule and title, running Ns, spinner, Cancelled after.

Traits§

ColorSchemeExt
Extension trait for ColorScheme: its ratatui palette.

Functions§

scheme_style
The ratatui style of a value that moved in direction under scheme.
strong
The strong (bold) form of a role: verdicts, states and headings.
style
The ratatui style of a role.
tone_color
The ratatui foreground color of a tone: its color, or the terminal default (Reset) when it has none. Effects are not part of a color.
tone_style
The ratatui style of a tone.