mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 11:56:18 -05:00
ui: lift warning above ordinary text in the monochrome themes
A load reading under warning rendered marginally QUIETER than a healthy one:
an uncoloured value inherits `--text`, 4.98:1 on a night panel, and `--warning`
was 4.91:1. Amber had the same inversion, 7.43 against 8.59.
Anything that means "look at this" has to be louder than the prose around it,
and with no hue to carry the signal, louder means brighter. Both `warning` and
`danger` now clear `--text` in night and amber:
night warning #ee3434 -> #f54040 4.91 -> 5.40 (--text 4.98)
danger #ff3e3e -> #ff5757 5.71 -> 6.41
amber warning #f18806 -> #fa9f31 7.43 -> 9.05 (--text 8.59)
danger #ff9e29 -> #ffb760 9.15 -> 10.96
I said last time this would trade night's "red only" character for loudness.
Having measured it, that was overstated. Red contributes 21% of luminance, so
in night NOTHING above ~4.9:1 can be a pure hue -- `#ff0000` itself is only
4.99:1 there. `--text` is already `#e04a4a`, carrying 74 of green and blue.
The new warning carries 64, LESS than the text beside it; only danger goes
further, at 87. A pure-hue ramp above the text was never on the table.
The rule is monochrome-only, like the ordering rule it sits beside. A light
theme's text is near-black at ~14:1 and no warning colour will ever match it --
there, hue is what marks a reading as flagged.
The guard now asserts warning as well as danger, and the LoadStatistic browser
test makes the claim it previously had to document as unmet: warning is louder
than a plain reading. Planted the reported bug back in both themes, plus two
ordering breaks.
One plant of mine came back green and was wrong, not the test: I set night's
danger to `#f04a4a` expecting it to drop below warning, but that has MORE green
and blue than `#f54040`, and green is 71% of luminance -- so it was still the
brighter of the two. Re-planted with a value that is genuinely dimmer.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1dc75896a9
commit
ff82bc7d61
3 changed files with 40 additions and 30 deletions
|
|
@ -80,8 +80,18 @@ html[data-theme="light"] {
|
|||
* In the MONOCHROME themes only (night and amber):
|
||||
* - the order neutral < info < success < warning < danger is strictly increasing in
|
||||
* contrast against the panel, so severity reads as brightness with no hue to help;
|
||||
* - danger reaches that theme's own `--text` brightness, so the loudest role is never
|
||||
* quieter than ordinary prose.
|
||||
* - BOTH warning and danger reach that theme's own `--text` brightness. Anything that
|
||||
* means "look at this" has to be louder than the prose around it, and with no hue to
|
||||
* carry the signal, louder means brighter. Warning used to sit just under `--text`
|
||||
* (4.91 against 4.98 in night), so a machine under load rendered marginally quieter
|
||||
* than a healthy one.
|
||||
*
|
||||
* Getting warning and danger above `--text` costs a little saturation, and it is worth
|
||||
* knowing exactly how little: red contributes only 21% of luminance, so in night nothing
|
||||
* above ~4.9:1 can be a pure hue -- `#ff0000` itself is only 4.99:1 there. `--text` is
|
||||
* already `#e04a4a`, carrying 74 of green and blue. The new `--warning` `#f54040` carries
|
||||
* 64, LESS than the text beside it; only `--danger` `#ff5757` goes further, at 87. The
|
||||
* theme's red-only character survives; a pure-hue ramp was never available.
|
||||
*
|
||||
* Those last two are NOT true of light and dark and must not be made true. There a role
|
||||
* is a hue, and the contrast order is an accident of which hues were chosen -- blue is
|
||||
|
|
@ -174,8 +184,8 @@ html[data-theme="night"] {
|
|||
--neutral: #992c2c;
|
||||
--info: #c02929;
|
||||
--success: #e02323;
|
||||
--warning: #ee3434;
|
||||
--danger: #ff3e3e;
|
||||
--warning: #f54040;
|
||||
--danger: #ff5757;
|
||||
}
|
||||
|
||||
/* Amber: a monochrome amber terminal palette, same flat style as the rest. */
|
||||
|
|
@ -215,8 +225,8 @@ html[data-theme="amber"] {
|
|||
--neutral: #815825;
|
||||
--info: #b06e1f;
|
||||
--success: #d37c11;
|
||||
--warning: #f18806;
|
||||
--danger: #ff9e29;
|
||||
--warning: #fa9f31;
|
||||
--danger: #ffb760;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue