Fix Opus statusline hue rendering as black in light theme

Hue 226 (#ffff00) has a contrast ratio of 1.05 against the tangere-light
background (#fdfdfa), below the minimum-contrast = 1.1 set in the ghostty
config. Ghostty then substitutes the foreground for whichever of black or
white has more contrast, so against a near-white background that letter of
the model name rendered black.

Swap 226 for 184 (#d7d700, ratio 1.51 light / 9.60 dark) in the Opus ramp
and the unknown-model fallback, the only two palettes that used it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonny Barnes 2026-08-04 17:35:33 +01:00
commit 8cc69aa6f3
No known key found for this signature in database

View file

@ -89,12 +89,15 @@ fn=$(( fn + 1 )); printf '%s' "$fn" > "$FRAMEF" 2>/dev/null
# ---- per-model hue family + per-effort color -------------------------------- # ---- per-model hue family + per-effort color --------------------------------
# Each model gets its own rainbow: Opus = warm reds/golds, Sonnet = blues, # Each model gets its own rainbow: Opus = warm reds/golds, Sonnet = blues,
# Fable = purples/magentas, Haiku = greens, unknown = full rainbow. # Fable = purples/magentas, Haiku = greens, unknown = full rainbow.
# Keep every hue above ghostty's minimum-contrast (1.1) against the LIGHT
# theme bg (#fdfdfa) — below it ghostty swaps the fg for black. That ruled out
# 226 (#ffff00, ratio 1.05), which rendered as a black letter; 184 replaces it.
case "$(printf '%s' "$model" | tr '[:upper:]' '[:lower:]')" in case "$(printf '%s' "$model" | tr '[:upper:]' '[:lower:]')" in
*opus*) MHUES=(196 202 208 214 220 226 214 208); memoji="🎭" ;; # theater: the grand opus *opus*) MHUES=(196 202 208 214 220 184 214 208); memoji="🎭" ;; # theater: the grand opus
*sonnet*) MHUES=(21 27 33 39 45 51 45 39); memoji="🪶" ;; # quill: the poem *sonnet*) MHUES=(21 27 33 39 45 51 45 39); memoji="🪶" ;; # quill: the poem
*fable*) MHUES=(93 99 135 141 177 201 171 135); memoji="🦄" ;; # unicorn: purple like its rainbow *fable*) MHUES=(93 99 135 141 177 201 171 135); memoji="🦄" ;; # unicorn: purple like its rainbow
*haiku*) MHUES=(22 28 34 40 46 82 118 46); memoji="🌸" ;; # cherry blossom *haiku*) MHUES=(22 28 34 40 46 82 118 46); memoji="🌸" ;; # cherry blossom
*) MHUES=(196 208 226 46 51 33 201 129); memoji="🤖" ;; *) MHUES=(196 208 184 46 51 33 201 129); memoji="🤖" ;;
esac esac
case "$eff" in # effort tier gets its own color, cool -> hot case "$eff" in # effort tier gets its own color, cool -> hot
low) effc=$'\e[38;5;245m' ;; # grey low) effc=$'\e[38;5;245m' ;; # grey