fix(panel): stop brand-colored capsules from reading as warnings (#332)

* fix(panel): stop brand-colored capsules from reading as warnings

Panel capsules carry no text, so color is their only cue. A brand hue
close to the theme's warning or critical color made a healthy quota look
like an alert: Z.ai's full red capsule next to a critical Codex capsule
in Catppuccin Mocha, and Claude's orange next to Breeze's warning orange.

ThemeContrast.distinctAccentColor compares OKLCH hues and returns a
fallback when a colored accent is within 20 degrees of a reserved
color. The panel reserves the warning and critical colors the applet
already uses, and falls back to the brand color with three quarters of
its chroma removed, keeping lightness and hue. The icon keeps the full
brand color; Minimal and distinct brands are unchanged.

Any quota above zero now fills at least a round dot, as popup overview
meters already do, so 4% remaining is distinct from an empty capsule.
The warning outline stays: it is the only cue that is not hue alone.

Documentation impact: CHANGELOG Unreleased, the usage guide's panel
section, and the regenerated Standard, Minimal, and usage-text panel
captures. TODO.md is unaffected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(panel): keep muted capsules readable and farther from warnings

An audit of all 76 bundled brands in Breeze Light, Breeze Dark, and
Catppuccin Mocha found two gaps in the first version. On Breeze Light,
plain desaturation dropped eight muted capsules just below 3:1 non-text
contrast (2.83 to 2.99). In Mocha, whose warning color is a pale cream,
muting yellow and gold brands such as Hugging Face moved them closer to
that warning (OKLab distance 0.113 to 0.050).

ThemeContrast.mutedAccentColor applies the existing readable-accent
correction after desaturation. distinctAccentColor now uses the fallback
only when it is perceptually farther from every reserved color than the
accent. After the change, no muted capsule is below 3:1 and none moves
closer to a warning color: 18 brands are muted in both Breeze themes and
only Z.ai in Mocha.

Documentation impact: usage guide and CHANGELOG describe both
conditions. The regenerated panel captures are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(panel): adapt capsule muting to saturated brands and minimal style

CodeRabbit flagged three findings on the capsule muting work. Two are
confirmed and fixed; one is partially correct and resolved by making the
invariant precise.

- A fixed 75% chroma reduction leaves very saturated brands such as Amp
  (0.054) and Mistral (0.051-0.055) above the 0.05 severity hue threshold,
  against the documented claim. The panel now derives the reduction from
  the accent chroma, so used muted colors stay below the threshold and
  readable on real Breeze and Catppuccin themes.
- Minimal style promises capsules in the theme text color, but the
  muting ran unconditionally on it. Gate the warning-hue transformation
  to Standard style.
- The proposed per-reserved-color fallback comparison regresses the
  reported Z.ai case in Catppuccin Mocha: the muted pink moves away from
  the red critical color but marginally closer to the cream warning, so
  the strict rule would keep the vivid brand pink that reads as the
  critical badge. The nearest-color rule already guarantees a fallback
  can never sit closer to any warning color than the accent was to its
  nearest one; the comment now states that invariant exactly.

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
392eff5328Simone committed on 9/23/2026, 12:01:56 PM· committed by GitHubparent957f9de
9 files changedLine totals unavailable