Skip to content

Darken Cool Breeze's default WarningColor to clear the 4.5:1 text floor (#4651) - #4658

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/4651-coolbreeze-warning-contrast
Sep 28, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
feature/4651-coolbreeze-warning-contrast

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4651.

Why

Cool Breeze's default WarningColor (#9E4A0B) measured 4.41:1 against the plan viewer's properties panel background (BackgroundDarkColor, #CFDDE9), under WCAG AA's 4.5:1 text floor. #4632 put warning-tier text on that panel (the missing-index impact % and per-thread skew), so the gap became visible text, not just a stray marker. Lite and the Darling Viewer ship the same values, so both were affected.

What changes

Darkened Cool Breeze's default WarningColor from #9E4A0B to #9C490B, same hue, in both shipped Cool Breeze theme files:

  • Lite/Themes/CoolBreezeTheme.xaml
  • Darling/PerformanceMonitor.Darling.Viewer/Themes/CoolBreezeTheme.xaml

#CFDDE9 (the properties panel) was the worst of the four named backgrounds, so it set the floor for how far to darken. #9C490B is the smallest same-hue darkening that clears 4.5:1 there: the next-lighter byte value, #9D490B, still measures 4.4737:1. Hue moved 25.71° to 25.65° (a rounding artifact of landing on a whole hex byte), saturation 0.8698 to 0.8683 — effectively unchanged.

Old -> new ratio, each named background this theme draws WarningBrush text on:

Background (key) Hex Old ratio New ratio
Properties panel (BackgroundDarkColor) #CFDDE9 4.41:1 (fail) 4.50:1
Cards (BackgroundColor) #DAE6F0 4.82:1 4.91:1
Plan nodes / status bar (BackgroundLightColor) #EEF4FA 5.51:1 5.62:1

(AlternatingRowColor #C5D5E4, marker-only per the existing #3609 comment, also moved 4.08:1 to 4.16:1 — not in scope, reported for completeness.)

This does not change override behavior: a user's own theme-colour override still wins over this default, and nothing here validates or clamps overrides.

Census across every shipped theme (#4651's second pin)

Read WarningColor and the literal-hex CriticalTextBrush (added by #4629/#4632/#4635) against the same three backgrounds, in all six shipped files (Lite and the Darling Viewer ship identical values per theme, confirmed by ThemeParityLiteDarlingTests):

Theme Color Panel Cards Nodes/status
Light WarningColor #AE4F08 4.77:1 4.99:1 5.35:1
Light CriticalTextBrush #A83A0D 5.72:1 5.97:1 6.41:1
Dark WarningColor #FFD54F 13.26:1 12.25:1 10.88:1
Dark CriticalTextBrush #FF7043 6.81:1 6.29:1 5.59:1
Cool Breeze (before) WarningColor #9E4A0B 4.41:1 (fail) 4.82:1 5.51:1
Cool Breeze (after) WarningColor #9C490B 4.50:1 4.91:1 5.62:1
Cool Breeze CriticalTextBrush #A83A0D 4.63:1 5.05:1 5.79:1

Cool Breeze's WarningColor on the panel was the only cell under 4.5:1 in any shipped theme. No other theme's default needed a fix, so none is touched beyond the two Cool Breeze files. deprecated/Dashboard's three theme files carry the same old #9E4A0B but are untouched: the Dashboard is deprecated, so this changes only the two shipped Cool Breeze files, and git diff --stat origin/dev -- deprecated/ is empty on this branch.

Test changes

Darling/Darling.Tests/Viewer4629Tests.cs:

  • The two strict-floor theories (WarningBrush_... and CriticalTextBrush_..., renamed to ...ReadsAsTextOnNodePanelCardAndStatusBarBackgrounds) now run over all six shipped theme files instead of only Light and Dark's four. Cool Breeze had been carried under an "existence-only" carve-out with a doc comment noting the 4.41:1 gap; that carve-out and its now-stale doc paragraph are gone. The now-unused LightDarkFiles/LightDarkThemeFiles members were deleted rather than left dead.
  • Added a CardBackgroundKey (BackgroundColor) constant and assertion to both theories, and a status-bar assertion to the WarningBrush theory (the CriticalTextBrush theory already had one) — cards and the status bar are backgrounds the default must clear, alongside the panel and plan nodes, and nothing previously asserted WarningBrush/CriticalTextBrush against BackgroundColor in this file (ThemeStatusContrastTests already covered WarningColor against BackgroundColor/BackgroundLightColor for all six themes, but not CriticalTextBrush, and not this file's BackgroundDarkColor panel key).
  • No golden hex pin held the old #9E4A0B (checked with a repo-wide grep); CriticalTextBrush_MatchesPinnedHex is untouched since that brush's value didn't change. ThemeColorOverrideTests' 18-key pin is unaffected — the change is a value, not a key.

Test plan

  • dotnet build Darling/Darling.Tests/Darling.Tests.csproj -c Debug — Build succeeded, 0 Warning(s), 0 Error(s)
  • dotnet build Lite.Tests/Lite.Tests.csproj -c Debug — Build succeeded, 0 Warning(s), 0 Error(s)
  • dotnet build Lite/PerformanceMonitorLite.csproj -c Debug — Build succeeded, 0 Warning(s), 0 Error(s)
  • Before the value change, Darling.Tests.exe -class Darling.Tests.Viewer4629Tests failed exactly on the two Cool Breeze rows of the (then newly broadened) panel assertion — 22 passed, 2 failed, proving the test catches the old shape
  • After the value change, the same class: 24 passed, 0 failed
  • Darling.Tests.exe -class Darling.Tests.ThemeCompletenessTests — 2 passed, 0 failed
  • Lite.Tests.exe -class Lite.Tests.ThemeStatusContrastTests -class Lite.Tests.ThemeColorOverrideTests -class Lite.Tests.ThemeCompletenessTests -class Lite.Tests.ThemeParityLiteDarlingTests — 130 passed, 0 failed
  • Full Darling.Tests.exe, once — Total: 16607, Failed: 0, Errors: 0 (1026 skipped, 1 not run — pre-existing environment-gated categories, unrelated to this change)
  • Full Lite.Tests.exe, once — Total: 5525, Failed: 1 on the first pass (StatusBarSizeReadLockTests.GetUsedDataSizeMb_WhenTheWriteLockIsHeld_GivesUpInsteadOfBlocking, a lock-contention timing test unrelated to theme files). Re-ran that class alone: 1 passed, 0 failed. Not filed; a timing flake under full-suite parallel load, reproduced clean in isolation.
  • git diff --stat origin/dev -- deprecated/ — empty, confirmed after staging

No live/database tests apply to this change.

Notes

CHANGELOG

SECTION: Fixed
ENTRY: - Cool Breeze's warning text now reads clearly on the plan viewer's properties panel ([#4658]) - In Lite and the Darling Viewer, warning-tier text in the Cool Breeze theme (the missing-index impact percentage and per-thread skew on the plan viewer's properties panel) was a shade too light to meet the accessibility contrast guideline there. The warning color is now slightly darker by default, so that text meets the guideline on the panel and on the theme's cards, plan nodes and status bar.
REF: [#4658]: #4658

…or (#4651)

WarningColor #9E4A0B measured 4.41:1 against the plan viewer properties
panel's BackgroundDarkColor, under WCAG AA's 4.5:1 text floor, once #4632
put warning-tier text there. Darkened to #9C490B, same hue, the smallest
step that clears 4.5:1 on every background Cool Breeze draws WarningBrush
text on. Applied identically to Lite and the Darling Viewer.

Viewer4629Tests now holds Cool Breeze to the same strict floor as Light
and Dark (previously exempted), and checks the card and status-bar
backgrounds alongside the panel and plan nodes for both WarningBrush and
CriticalTextBrush.
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review September 28, 2026 21:39
@erikdarlingdata
erikdarlingdata merged commit a94cafa into dev Sep 28, 2026
20 of 22 checks passed
@erikdarlingdata
erikdarlingdata deleted the feature/4651-coolbreeze-warning-contrast branch September 28, 2026 21:39
erikdarlingdata added a commit that referenced this pull request Sep 28, 2026
…'s theme-parity test (#4668)

#4658 darkened Cool Breeze's WarningColor from #9E4A0B to #9C490B in Lite and the Darling Viewer, but the Dashboard's copy of the theme kept #9E4A0B. ThemeParityTests requires the keys the Dashboard and Lite theme files share to match, so on dev it failed CoolBreeze on WarningColor and WarningBrush. #4658's CI never ran it: the build's dashboard path filter covers only deprecated/Dashboard/** and deprecated/Dashboard.Tests/**.

- deprecated/Dashboard/Themes/CoolBreezeTheme.xaml: WarningColor is #9C490B. WarningBrush is built from it, so it follows.
- That file's contrast comments now give the new color's figures: 4.50:1 on BackgroundDarkColor, 4.91:1 on BackgroundColor, 5.62:1 on BackgroundLightColor, and white text 6.23:1 on the color itself. The Dashboard's Cool Breeze backgrounds are the same as Lite's.

Nothing else under deprecated/ changes. Erik approved this one-file exception to the no-deprecated/ rule.

Refs #4651
erikdarlingdata added a commit that referenced this pull request Sep 28, 2026
…4674)

ThemeParityTests in deprecated/Dashboard.Tests reads Lite/Themes/*.xaml, but the build's dashboard filter covered only deprecated/Dashboard/** and deprecated/Dashboard.Tests/**. #4658 changed only a Lite theme color, its build logged "Filter dashboard = false", the test was skipped, and dev went red until #4668.

.github/workflows/build.yml:
- The dashboard filter also matches Lite/Themes/**/!(*.md), with a comment saying why.
- The Build Dashboard.Tests and Run Dashboard tests steps also run when installer_core changes. The Dashboard references Installer.Core, and that filter's comment already said a change there rebuilds both products, but only the CLI Installer's steps checked it.

Proof: a throwaway draft (#4675, closed unmerged) with only a Lite theme comment on top of this branch logged "Filter dashboard = true", matching only Lite/Themes/CoolBreezeTheme.xaml.

Refs #4673
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