GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Asthma colors: dark mode and light-mode contrast fixes by n400 · Pull Request #672 · CareEvolution/MyDataHelpsUI Conversation
|
| What | Shipped | Now |
|---|---|---|
| Add and Save buttons | white on #369CFF, 2.9:1 | white on blue-50, 4.6:1 |
| Edit button | #007FF9 on #BBDEFF, 2.8:1 | blue-60 on azure-10, 4.6:1 |
| Calendar "not controlled" days | white on #F86A5C, 2.9:1 | white on red-muted-50, 4.5:1 |
| Symptoms pill | #E87C00 on #f9debf, 2.2:1 | orange-55 on orange-5, 4.5:1 |
| Impacts pill | #9D5BED on #e6d6fa, 3.0:1 | violet-55 on violet-5, 4.6:1 |
| Symptoms dot | #E87C00, 2.87:1 | orange-40, 3.01:1 |
| Calendar "controlled" ring | #35A6A0, 2.95:1 | teal-40, 3.02:1 |
| Calendar "controlled" day number | #35A6A0, 3.0:1 | teal-55, 5.3:1 |
| Status header "controlled" heading | #03dbcc, 1.7:1 | teal-55, 5.3:1 |
| Status header "not controlled" heading | #fc6666, 2.9:1 | red-muted-55, 5.3:1 |
| "In range" text | #188A83, 4.2:1 | teal-55, 5.3:1 |
| "Out of range" text | #9D5BED, 4.1:1 | violet-55, 5.3:1 |
Changed to match. These passed as shipped and changed so every role follows the same pattern:
| What | Shipped | Now |
|---|---|---|
| Triggers pill | black on #bfbfbf | grey-55 on grey-5, like the other pills |
| Impacts dot | #9D5BED, 4.08:1 | violet-40, 3.00:1, like the symptoms dot |
| Status header count bubbles | page text color on #fc6666 | white on red-muted-50, like the "not controlled" days |
| Calendar entry pills | page text color on the tints | each role's text color, like the log entry's pills |
The calendar's "today" day, shown before anything is logged, was a light blue disc (#369CFF) with a white number at 2.85:1. It is now a filled disc in the asthma button blue with a white number, 4.6:1. The shared calendar's own "today" style, which other calendars use, is unchanged.
In this PR's Storybook, switch between light and dark with the ☀/☾ button in the toolbar, and check each story in both modes. Set the state in the Controls panel.
Most likely to regress: the light-mode look of every asthma screen, since light changed on purpose.
Partly generated by Claude Opus 5.5 and Claude Fable 5.1, xhigh effort
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Light keeps every hex the asthma components shipped with, so light is unchanged. Dark maps each role onto the ramp: fills at grade 50, text at 30, dots at 40, chips as an 80 tint carrying the role's 20. The black triggers dot that disappeared on the dark card (1.36:1) now reads at 9.5:1. audit:colors checks the 21 new asthma pairs; all pass in dark. In light, 12 of them fail — those are the shipped colors measured for the first time, not regressions; light-mode contrast is a separate deferred item. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Chips first shipped as a dark tint (grade 80) with light text — passed audit:colors on paper (text-on-chip 6.5:1) but chip-vs-card measured 1.5:1, nearly indistinguishable from the card behind it. Caught in review: the pills read as a smudge, not a badge. Fixed to the same vivid-fill-plus-white-ink pattern the rest of the app already uses for a colored fill (grade 50, white ink) instead of inventing a separate dark-tint treatment. Chip-vs-card is now 3.4:1, a real edge; text-on-chip is still 4.5:1+. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Several rendered dark-mode contrast relationships fail targets or are not validated by the audit.
Get a fresh assessment by requesting another Copilot review.
This draft replaces hardcoded Asthma colors with semantic light/dark tokens while preserving light-mode styling.
Changes:
| File | Review summary |
|---|---|
src/helpers/globalCss.ts |
Moderate (1 vote): Dark chip/mark pairings miss the 3:1 contrast target. Nit (1 vote): Implementation does not match the documented grade-80/20 mapping. |
src/components/asthma/views/AsthmaLogEntryEditorView/AsthmaLogEntryEditorView.tsx |
No findings. |
src/components/asthma/helpers/asthma-functions.ts |
No findings. |
src/components/asthma/components/AsthmaLogEntryHeader/AsthmaLogEntryHeader.css |
No findings. |
src/components/asthma/components/AsthmaLogEntryDetails/AsthmaLogEntryDetails.css |
No findings. |
src/components/asthma/components/AsthmaControlStatusHeader/AsthmaControlStatusHeader.css |
Moderate (1 vote): Dark count-badge text inherits an insufficient foreground color. |
src/components/asthma/components/AsthmaControlCalendar/AsthmaControlCalendar.tsx |
No findings. |
src/components/asthma/components/AsthmaControlCalendar/AsthmaControlCalendar.css |
No findings. |
scripts/color-audit.mjs |
Moderate (2 votes): The badge audit assumes white text rather than the rendered foreground. Moderate (1 vote): Mark-on-chip contrast is not audited. |
scripts/color-audit.mjs:161
*-mark inside its corresponding *-chip, but this only checks the mark against bg0. The current dark orange-40-on-orange-50 pairing is therefore reported as passing despite its roughly 1.5:1 contrast. Add a mark-on-chip pair for every role so this audit covers the actual rendered relationship. pushPair(`asthma ${r}-mark on bg0`, `--mdhui-color-asthma-${r}-mark`, SURFACES[0], MARK_FLOORS.wcag, MARK_FLOORS.apca, false);
src/components/asthma/components/AsthmaControlStatusHeader/AsthmaControlStatusHeader.css:49
var(--mdh-grey-5)), not the #fff foreground assumed by the new audit pair. On var(--mdh-red-orange-50) this is below the 4.5:1 text threshold, so the dark count bubbles do not meet the stated contrast target. Add a badge-text token that preserves the existing light #333 foreground and maps to white in dark, then apply it here (and audit that token). background: var(--mdhui-color-asthma-not-controlled-badge);
src/helpers/globalCss.ts:718
'--mdhui-color-asthma-symptoms-chip': 'var(--mdh-orange-50)',
src/helpers/globalCss.ts:718
AsthmaControlCalendar. With the marks at grade 40 and these chips at grade 50, orange-40 on orange-50 and violet-40 on violet-50 are only about 1.5:1 (grey is about 2.8:1), so the dots miss the 3:1 non-text contrast target even though the new audit passes. Use the documented grade-80 chip/grade-20 text mapping, or another passing mark/chip pairing, consistently for all three roles. '--mdhui-color-asthma-symptoms-chip': 'var(--mdh-orange-50)',
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The blue-80 tint with blue-30 text measured 2.78:1 against the grey-85 card. It now matches the chips: blue-50 fill, white text, 4.6:1. Light is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The dark-mode count badges fall below the 4.5:1 contrast minimum, and the audit misses this by testing white rather than the actual inherited text color.
In code that hasn't changed since last review
src/components/asthma/components/AsthmaControlStatusHeader/AsthmaControlStatusHeader.css:49
The count badges inherit --mdhui-text-color-1 from Layout, giving their small text only 4.44:1 contrast in dark mode (#FCFCFC on #DC3800), below the 4.5:1 minimum. The new audit misses this because it checks #fff instead. Add a badge foreground token that preserves #333 in light mode and uses #fff in dark mode, apply it here, and audit that actual foreground/fill pair.
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Buttons and the calendar's "not controlled" days take a grade-50 fill with white text. The pills keep a pale tint, now grade 5, with grade-55 text of the same hue. The status header's count bubbles set white text on a grade-50 red instead of inheriting the page text, and the calendar's entry pills take their role's text color. In both modes, the calendar's today disc, shown before anything is logged, takes the asthma action fill with white text; the shared calendar's light blue left the white number at 2.85:1. The program's text colors follow the system's fill / -text / -mark families. The status header's headings use the -text tokens, controlled-text and a new not-controlled-text, in place of separate heading tokens, so they are held to the 4.5:1 text floor even though they are large. In light the four -text tokens (controlled, not controlled, in range, out of range) are grade 55, which passes on both cards and the page background; grade 50 passed only on cards. The calendar's "controlled" ring is a mark on its own token, teal-40 in light, with the day number on controlled-text; in dark both are teal-30, so the ring keeps enough lightness against the red disc to tell the two apart under red-green color blindness. The color audit measures what is drawn: white on the fills and bubbles, the ring at the mark floor, and the asthma -text tokens at the text floor on every surface, the same way it checks the system's own -text tokens. In light those four tokens still fall short on the deepest surface (#ddd), as the system's own light -text tokens do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>
…t to the shipped colors #672 Co-Authored-By: Claude Opus 5.5 <[email protected]>
#672 Co-Authored-By: Claude Opus 5.5 <[email protected]>
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.