rdmsm4x-changelog-20260904-0012-claude-statusline-v2.4.0-switchable-model-chip-themes
[2026-09-04 00:12 EDT · rdmsm4x]
Summary: Model-chip colours are no longer hardcoded.
v2.4.0 ships 8 themes switchable per host, with a live
in-terminal preview and a fleet-wide switcher. Installed on all six
hosts. The default is unchanged (frost) —
nobody's status line changes appearance until they choose a theme.
Why a theme table instead of just recolouring
Rich asked for "darker orange background with black letters". That specific pair is fine — but the failure mode it invites is not, so the colours are now data that gets measured rather than literals someone eyeballs.
Every (background, foreground) pair was checked with the WCAG 2.1 relative- luminance formula before being encoded. The chip is short bold text, so AA-large (3.0:1) is the floor and AA (4.5:1) is the target:
| theme | character | worst pair |
|---|---|---|
frost |
Nord Frost blues, shaded by family — default | 3.50:1 |
ember |
burnt orange, black letters — the requested look | 4.87:1 |
amber |
bright amber/gold, black letters | 8.31:1 |
aurora |
full Nord Aurora, a distinct hue per family | 3.55:1 |
magma |
deep volcanic orange, light-on-dark | 4.16:1 |
slate |
quiet Nord polar night, snow letters | 4.93:1 |
snow |
light chip, dark letters (light terminals) | 6.06:1 |
mono |
no chip at all — the pre-2.3.0 look | n/a |
Nothing fails. Worth noting: the weakest pair on the fleet is
the shipped default, frost/Opus at 3.50:1 —
passing, but the floor. ember is stronger.
Usage
bash ~/.claude/statusline.sh --chip-preview # see all 8, in your terminal
bash ~/.claude/statusline.sh --set-theme ember # this host
zsh ~/.claude/canonical/statusline_theme_fleet.zsh ember # all six hosts
zsh ~/.claude/canonical/statusline_theme_fleet.zsh --show # report per host
Resolution order: $CC_STATUSLINE_THEME →
~/.claude/statusline-theme → frost. The env
var makes a theme trialable for one session without touching any file.
The theme file is per-host, so one machine can deliberately differ.
Verification
- All 8 themes × 4 model families render; emitted ANSI RGB compared
programmatically against the contrast-checked hex — exact match on every
pair sampled across
frost/ember/amber/magma/snow/slate. monoemits no48;2;background sequence, and suppresses the chip's pad spaces so there is no stray coloured gap. Asserted, not assumed.- An invalid theme name falls back to
frostand still renders the model — a typo in the theme file must not cost the model readout.--set-themerejects unknown names with exit 1. - Perf held to parity, which required a fix: the
first cut called
$(model_family …), forking a subshell on every keystroke — measured ~2.8ms per render, the same order as the git call this script deliberately avoids. Rewritten to assign$FAMILYinstead of echoing. 30 renders: 2.748s (v2.4.0) vs 2.744s (v2.3.0). - Post-push all 5 remotes report sha
7a0374064f1855016235726c17068635592da7b466071849697c32e25251ae65. Live remote render withCC_STATUSLINE_THEME=emberon rdmbair15m5 and rdmpw3265m emitsESC[48;2;180;101;60m=#B4653C, correct. statusline_theme_fleet.zsh --show: all six hosts reportfrost.
Files
~/.claude/canonical/statusline.sh→ v2.4.0, sha7a03740…(555)~/.claude/canonical/statusline.sha256~/.claude/canonical/statusline_theme_fleet.zsh— new (555)~/.claude/statusline.shon all 6 hosts- Dead code removed: the v2.3.0 hardcoded
BG_N*/FG_*palette block, now superseded by the theme table (0 references remain).
Undo
~/.claude/backups/statusline.sh.v2.3.0-bak-20260904-0009
(rdmsm4x) and statusline.sh.bak-20260904-001* on each
remote. Revert canonical, not just the live file —
statusline-verify.sh restores from canonical at
SessionStart.
Outstanding
- Apple Notes entry pending for this and the v2.3.0 changelog —
session is
launchctl managername = Background, sonotes_changelog.zshcorrectly refuses. Publish both from an Aqua session. - No theme has been chosen; the fleet is on the
frostdefault by design.