Skip to main content

Module theme

Module theme 

Source

Re-exports§

pub use crate::tui::ThemeKey;

Structs§

RabTheme
The concrete theme used by the rab UI. Wraps resolved ANSI escape codes for foregrounds, backgrounds, and text styling.
ThemeConfig
Theme JSON structure matching pi’s theme format.

Enums§

ColorMode
Terminal color capability mode.
ColorValue
A color value in a theme config: hex string “#ff0000”, var reference “accent”, 256-color index (0-255), or empty string for default terminal color.

Functions§

current_theme
Get the current theme.
detect_terminal_theme
Detect terminal background theme using environment variables. Returns “dark” or “light”.
get_available_themes
Get available theme names.
get_markdown_theme
Build a MarkdownTheme from the current RabTheme. Wires all existing md* colors and text decorations.
init_theme
Initialize the theme system. Call once at startup.
set_theme
Set a new theme by name. Returns success/error.