Skip to main content

Module theme

Module theme 

Source

Structs§

ColorSlot
A single color slot with per-tier values.
ThemeDef
Complete theme definition with all color slots.

Functions§

accent
Brand-coloured emphasis without BOLD. Reads the accent colour slot so it renders in the active theme’s brand colour (purple on the default theme). Use for in-content cursor indicators, focused tag spans and any non-bold accent emphasis. Pair with accent_bold() when the same content should also bold (overlay titles, focused selection, reference keys in help text).
accent_bold
Keybinding keys in footer/help. Brand accent slot with BOLD.
bold
Bold text (labels, emphasis).
border
Default border (unfocused).
border_danger
Danger border (delete dialog). Red when color is available.
border_dim
Structural border style for overlay frames and dividers. Reads the border colour slot, which carries the DIM modifier on most themes so overlay frames recede behind their content. Use for borders, dividers and any other “dim chrome” that should not steal attention.
border_search
Search-mode border. Purple to signal active filter state.
brand
Brand accent for dialog/popup titles. Removes DIM so border_style doesn’t leak through ratatui’s Style::patch().
brand_badge
Brand badge: purple background with white text. The single splash of color. Truecolor: #9333EA purple bg. ANSI 16: Magenta bg. NO_COLOR: REVERSED. Removes DIM so border_style doesn’t leak through ratatui’s Style::patch().
color_mode
current_theme
danger
Danger action key (delete confirmation). Red when color is available.
error
Error message. Red when color is available.
footer_key
Footer keycap style: background matches the dim border tone. Truecolor: explicit gray bg matching typical DIM rendering. ANSI 16: DarkGray bg approximates DIM borders. NO_COLOR: REVERSED fallback.
healthy
Style for stable healthy attributes that are neither “live now” (online_dot) nor a positive action outcome (success). Use for “passphrase encrypted”, “agent loaded”, “TTL > threshold” and other settled-good states that the user does not need to act on.
highlight_bold
Search match highlight.
init
Initialize theme settings. Call once at startup.
logo_dot
Accent colour for the trailing . of the purple. logotype in overlay headers. Intentionally distinct from accent_bold so the dot echoes the cyan accent from the landing-page hero.
muted
Muted/secondary text.
nav_active
Active tab marker for the top navigation bar.
online_dot
Style for online status dot. Three urgency tiers: NO_COLOR = normal (no modifier), ANSI 16 = Green + DIM, truecolor = muted green + DIM.
online_dot_pulsing
Breathing variant of online_dot() for per-host indicators on the host list. Cycles through three states over ~2.4s (30 ticks at 80ms) to give reachable hosts a subtle “alive” pulse without the constant attention pull of a blinking glyph or moving shape:
section_header
Section headers (help overlay, host detail).
selected_row
Selected item in a list. Purple highlight for brand consistency.
set_theme
success
Success message. Green when color is available.
supports_colored_underline
True when the terminal is expected to honour SGR 58 (colored underline). Falls back to false on known legacy terminals so styles can pick a non-styled-underline alternative. Detected once in init().
tag_user
Style for user-defined tag spans rendered in the host list and detail panel. Brand accent colour without BOLD. Named so the call sites read as intent (“this token is a user tag”) rather than as styling choice.
toast_border_error
Toast border for error messages (red, bold-on-NO_COLOR).
toast_border_success
Toast border for success/confirmation messages.
toast_border_warning
Toast border for warning messages (yellow, bold-on-NO_COLOR). Visually distinct from toast_border_error so warnings (recoverable) and errors (require acknowledgement) can be told apart at a glance.
tunnel_active
Style for the active-tunnel indicator on host-list rows. Brand accent colour without BOLD. Named so the call sites read as intent (“this row has an active tunnel”), not as pixel choice.
update_badge
Update available badge. Purple background to stand out in the title bar.
version
Version number in help overlay. Purple foreground.
warning
Warning message. Yellow/amber when color is available.