Skip to main content

Module styles

Module styles 

Source
Expand description

ANSI style constants and theme support.

All styles are zero-allocation anstyle::Style constants. paint applies a style to a &str and returns an owned String.

Constants§

ACCENT
Bright magenta bold — default accent color.
ARROW
Hint arrow
BADGE_CYAN
Cyan background badge — default theme.
BADGE_GREEN
Green background badge.
BADGE_INTRO
Cyan background, black text, bold — the clack-style intro pill.
BADGE_YELLOW
Yellow background badge (dark text for contrast).
BAR
Vertical bar
BOLD
Bold white.
BRANCH
Sub-step branch └─
BULLET
Step bullet
CHECK
Success check
CROSS
Error cross
CYAN
Cyan — paths and highlights.
DIAMOND
Section diamond
DIM
Bright black — dimmed / secondary text.
ERR
Bright red bold — error indicators.
OK
Green — success indicators.
PHASE
Phase triangle
WHITE
Bright white — section headers.
WHITE_BOLD
Bright white + bold — prompt question text.
YELLOW
Yellow — sizes and warnings.

Functions§

paint
Apply an anstyle::Style to s and return an owned String.
theme_styles
Returns (badge_style, accent_style) for the given theme name.