GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Asthma colors: dark mode and light-mode contrast fixes by n400 · Pull Request #672 · CareEvolution/MyDataHelpsUI

Conversation

@n400

@n400 n400 commented Sep 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Before and after, both modes: screenshots of every change

Click through it yourself: this PR's Storybook has every asthma story, and each testing step below links its story.

Overview

Part of the dark mode color cleanup. The asthma program's colors were hardcoded hex values, so they didn't change in dark mode. The worst case was the black triggers dot, at 1.36:1 on the dark card.

This PR replaces those hex values with colors from the shared color ramp, set through new --mdhui-color-asthma-* variables with separate light and dark values. Each pair now meets the contrast contract in both modes on the cards asthma screens use. Two stay as literal values: white text on the filled buttons and days, and the triggers dot in light mode, which stays black.

To check the pairs, run node scripts/color-audit.mjs semantic --scheme light or --scheme dark; both now include the asthma pairs.

Not in scope:

  • The backgrounds the asthma screens sit on. In light mode they're still hardcoded hex values, not tokens. In light mode, the text colors would fail on the darkest background, #ddd, which no asthma screen currently uses. But, as a followup, we might want to use the ramp everywhere to be safe.
  • The shared system colors: muted text, primary, success, warning, danger, and the glucose, heart-rate, activity, and sleep colors.
  • The printed provider report and the alert takeover's placeholder circle.

Dark mode

Every asthma color gets a dark value:

  • The Add and Save buttons and the pills: a grade-50 fill with white text.
  • The Edit button: an azure-20 fill with blue-70 text.
  • Text: grade 30.
  • Dots: grade 40 for symptoms and impacts, and a light grey (grey-20) for triggers.
  • The calendar's "controlled" ring is grade 30, like its number, so it differs from the red "not controlled" day by lightness for people with red-green color blindness.

Light mode

Fixed. These 12 pairs failed as shipped. Text needs 4.5:1, and the dots and ring need 3:1. Ratios are on a white card.

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

Both modes

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.

  • This depends on a Consumers fix: n/a
  • This requires configuration changes: n/a
  • New/Updated Survey Step, or changes to Survey Admin logic: n/a

Testing

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.

  • Asthma/Components/AsthmaLogEntryDetails, state "logged with mild symptoms": the three colored dots, the symptoms, impacts, and triggers pills, and the Edit button, which should be pale blue with blue text in both modes. In dark, the triggers dot should be visible.
  • Asthma/Components/AsthmaControlCalendar, state "some logs": the "not controlled" days should be a red fill with white numbers, controlled days a teal ring with a darker teal number. Switch the variant to "verbose" to see the entry pills under each day. Switch the state to "no logs": today should be a solid blue disc with a white number.
  • Asthma/Components/AsthmaControlStatusHeader, state "not controlled": the red heading and the red count bubbles with white text.
  • Asthma/Components/AsthmaLogEntryHeader and Asthma/Views/AsthmaLogEntryEditorView: the blue Add and Save buttons.
  • Asthma/Components/AsthmaBiometrics and AsthmaAirQualities: the teal "in range" and violet "out of range" text.
  • Asthma/Views/AsthmaDayView: most of the above together.

Most likely to regress: the light-mode look of every asthma screen, since light changed on purpose.

Documentation

  • N/A: This feature does not require documentation.

Security Checklist

  • I have reviewed the security checklist above. This change has no security impact: it swaps hex colors for CSS variables and changes color values.

Partly generated by Claude Opus 5.5 and Claude Fable 5.1, xhigh effort

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@n400 @claude
Asthma colors become tokens so the program renders in dark mode
b0db6c1
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]>
@aws-amplify-us-east-1

aws-amplify-us-east-1 Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-672.d1xp2kmk6zrv44.amplifyapp.com

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@n400 @claude
Fix invisible asthma chips: fill at grade 50, not a dark-80 tint
a7ee0f8
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]>
@n400
n400 requested a lite review from Copilot September 18, 2026 04:05
Copilot started reviewing on behalf of n400 September 18, 2026 04:05
View session
Copilot AI reviewed Sep 18, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several rendered dark-mode contrast relationships fail targets or are not validated by the audit.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This draft replaces hardcoded Asthma colors with semantic light/dark tokens while preserving light-mode styling.

Changes:

  • Adds Asthma light/dark color mappings.
  • Updates Asthma components and status helpers to use tokens.
  • Extends the color audit with 21 Asthma color pairs.
File summaries
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.
Review details

Suppressed comments (4)

scripts/color-audit.mjs:161

  • The calendar renders each *-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

  • The badge only changes its background here; its foreground still inherits the dark root color (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

  • The PR description says dark chips should use an 80-grade tint carrying the role's 20, but these mappings use grade-50 fills with white text (and the preceding comment still describes the 80/20 scheme). Please reconcile the implementation with that stated requirement, or update the PR description to document this intentional grade-50 exception so the acceptance criteria are accurate.
    '--mdhui-color-asthma-symptoms-chip': 'var(--mdh-orange-50)',

src/helpers/globalCss.ts:718

  • These dark chip fills are also the backgrounds for the role dots in 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)',
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread scripts/color-audit.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@n400 @claude
Asthma Edit button: grade-50 fill with white text in dark
3e0e795
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]>
@n400
n400 requested a balanced review from Copilot October 28, 2026 03:29
Copilot started reviewing on behalf of n400 October 28, 2026 03:29
View session
Copilot AI reviewed Oct 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

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.

1 open issue
  • Medium severity The not-controlled-badge pair is audited with #fff, but AsthmaControlStatusHeader.css does…
1 previously missed issue

In code that hasn't changed since last review

Medium severity Fix dark-mode badge text contrast

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
n400 and others added 2 commits November 14, 2026 16:27
@n400 @claude
Asthma colors: light-mode contrast fixes
11774e0
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]>
@n400 @claude
Asthma Edit button stays secondary: azure fill with blue text, closes…
5a24626
…t to the shipped colors

#672

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@n400 n400 changed the title Asthma: dark-mode colors (DRAFT) Asthma colors: dark mode and light-mode contrast fixes Nov 17, 2026
@n400
n400 marked this pull request as ready for review November 17, 2026 05:02
@n400 @claude
Asthma colors: drop the duplicate not-controlled badge token
4f35829
#672

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@n400
n400 requested a review from greinard November 17, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@greinard greinard Awaiting requested review from greinard

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@n400
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.