Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the ringing alert sometimes has very low contrast. There are potentially three different backgrounds on which the alert could be ringing:
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!