Skip to main content

Module theme

Module theme 

Source

Structs§

Theme

Enums§

Color

Constants§

BOLD
DIM
PRESET_NAMES
RST

Functions§

animate_countup
animate_countup_pct
Count-up for percentage values (0.0 -> final_pct, displayed as “68.3%”).
animate_countup_usd
Count-up for USD values (0.00 -> final_usd, displayed as “$1,289.35”).
animate_section_reveal
Writes sections to stdout one by one with a delay between each, using cursor control to create a reveal effect. Skips animation when NO_COLOR or non-TTY.
bold
dim
from_preset
load_theme
no_color
pad_right
Pad a string to target visual width with spaces on the right. If the string exceeds target, it is visually truncated.
preset_cyberpunk
preset_default
preset_monochrome
preset_neon
preset_ocean
preset_sunset
rst
save_theme
theme_file_path
truncate_visual
Truncate a string to at most max_cols terminal columns, preserving ANSI escape sequences and respecting wide characters.
visual_len
Visual width of a string in terminal columns, ignoring ANSI escape sequences and accounting for wide characters (emoji, CJK = 2 columns).