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::Styletosand return an ownedString. - theme_
styles - Returns
(badge_style, accent_style)for the given theme name.