Expand description
Terminal theme & spinner helpers.
Mirrors openclaw’s “lobster palette” (src/terminal/palette.ts) and
src/terminal/theme.ts. Respects the NO_COLOR env-var and the
--no-color CLI flag.
§Palette (from openclaw docs/cli/index.md)
| Token | Hex | Usage |
|---|---|---|
| accent | #FF5A2D | headings, labels, primary |
| accent_bright | #FF7A3D | command names, emphasis |
| accent_dim | #D14A22 | secondary highlight |
| info | #FF8A5B | informational values |
| success | #2FBF71 | success states |
| warn | #FFB020 | warnings, fallbacks |
| error | #E23D2D | errors, failures |
| muted | #8B7F77 | de-emphasis, metadata |
Modules§
- palette
- Lobster palette hex values — source of truth.
Functions§
- accent
- Primary accent (headings, labels).
- accent_
bright - Bright accent (command names, emphasis).
- accent_
dim - Dim accent (secondary highlight).
- bold
- Bold text (no colour).
- dim
- Dimmed text (terminal dim attribute).
- disable_
color - Call once at startup (after CLI parsing) to disable colour globally.
- error
- Error / failure.
- heading
- Bold heading in accent colour.
- icon_
fail - Red ✗
- icon_
muted - Muted dash —
- icon_ok
- Green ✓
- icon_
warn - Yellow ⚠
- info
- Informational values.
- init_
color - Initialise the colour system. Checks
NO_COLORenv-var and optional--no-colorflag. - label_
value - Format “ Label : value“ with the label dimmed and the value in accent.
- muted
- De-emphasis / metadata.
- print_
header - Print a styled header box (like openclaw’s
intro()from clack). - spinner
- Create an indeterminate spinner with a message.
- spinner_
fail - Finish a spinner with a failure icon + message.
- spinner_
ok - Finish a spinner with a success icon + message.
- spinner_
warn - Finish a spinner with a warning icon + message.
- success
- Success state.
- warn
- Warning / attention.