Skip to main content

Module theme

Module theme 

Source
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)

TokenHexUsage
accent#FF5A2Dheadings, labels, primary
accent_bright#FF7A3Dcommand names, emphasis
accent_dim#D14A22secondary highlight
info#FF8A5Binformational values
success#2FBF71success states
warn#FFB020warnings, fallbacks
error#E23D2Derrors, failures
muted#8B7F77de-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_COLOR env-var and optional --no-color flag.
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.