Expand description
Modules§
- detect
- System light/dark detection: terminal background (OSC 11), then the OS preference, else dark.
Structs§
- Meta
- Plain
Dir - A plain folder:
std::fswith the platform’s default permissions. - Theme
File - Variant
Def
Enums§
- Color
Depth - Terminal color depth.
- Mode
- Light, dark, or follow the system. The app’s preference type converts into it.
- Theme
Error - Variant
Constants§
- BUILTINS
- Built-in themes compiled into the binary.
- DEFAULT_
THEME - MIN_
CONTRAST - ROLES
- Semantic roles every variant must define.
- THEME_
FILE - The file holding one theme inside its folder.
Traits§
- Theme
Dirs - Where themes live and how they are written. The app implements it, so this crate owns no home-directory layout or file-permission policy.
Functions§
- active
- Load the active theme; falls back to the default if the configured one is broken.
- builtin
- contrast
- WCAG contrast ratio (1..21).
- contrast_
warnings - Contrast warnings for a variant (fg/bg pairs).
- list
- Theme folder names, built-ins first in their fixed order.
- load
- luminance
- WCAG relative luminance.
- materialize
- Write built-in themes to
themes/<name>/when missing. - nearest_
256 - Nearest xterm-256 index.
- parse_
hex - reset
- Restore the shipped version of a built-in theme.
- resolve_
variant - Resolve the active variant from a mode.
- save
- to_hex
- valid_
name