Expand description
ANSI styling primitives and the --ansi / --no-ansi / NO_COLOR
resolution chain used by the help renderer and CLI output.
Terminal colors and formatting.
Default: auto-detect via stderr TTY + industry-standard env vars
(NO_COLOR, FORCE_COLOR). Explicit override via --ansi/--no-ansi
flags (set by main before any rendering). Falls back to plain text
when piped or redirected.
Enums§
- Color
Choice - Explicit color preference.
Automeans “pick based on TTY + env vars”;Always/Neverforce the answer regardless of environment.
Functions§
- bold
- color_
choice - Current explicit choice, or
Autowhen none is set. - color_
enabled - Whether color output should be emitted right now.
- dim
- green
- print_
cli_ error - Print a red-prefixed
error: <msg>line to stderr. - red
- set_
color_ choice - Override the auto-detected choice. Called by
mainafter parsing--ansi/--no-ansi. Subsequentcolor_enabled()calls reflect the override. - yellow