Skip to content

Improve ringing alert colors#31

Merged
nedtwigg merged 5 commits intomainfrom
screenshots-and-tutorial
Apr 29, 2026
Merged

Improve ringing alert colors#31
nedtwigg merged 5 commits intomainfrom
screenshots-and-tutorial

Conversation

@nedtwigg
Copy link
Copy Markdown
Member

Previously, the ringing alert sometimes has very low contrast. There are potentially three different backgrounds on which the alert could be ringing:

  • active-pane
  • inactive-pane
  • door (which could be the same as inactive-pane or terminal)

In this PR, we tried a case where we calculated an automatic high-contrast, opposite hue color, but the results were not good. In the end, we just went with either pure white or pure black, based on context. Coupled with the motion, it works great!

nedtwigg and others added 5 commits April 29, 2026 16:21
Drops the static --color-warning family in favor of three runtime-computed
tokens (--color-alarm-vs-{header-active,header-inactive,door}) derived from
each surface's bg: rotate hue 180° (or hue=90 for greyscale bgs), push chroma
high, let per-channel sRGB clipping handle gamut. Keeps the alarm
theme-aware so the bell stays visible without hand-tuning per theme.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous "preserve bg L" rule meant low-L bgs produced low-L alarms — fine
hue/chroma but visually dim. Inverting L (1 - bgL) gives the bell strong
luminance contrast against the bg, which is the dominant signal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hue-rotation schemes produced muddy colors at extreme lightnesses (light bgs
went near-black, dark bgs went dim). Pure black/white based on bg L>=0.5
gives the strongest possible luminance contrast and reads as a clean alarm
on every theme. Drops the unused oklabToRgb / oklchToCssHex helpers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nedtwigg nedtwigg merged commit 4068074 into main Apr 29, 2026
6 checks passed
@nedtwigg nedtwigg deleted the screenshots-and-tutorial branch April 30, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant