Skip to content

Raise themed readable-text mixes to WCAG AA contrast - #10571

Open
fresh3nough wants to merge 1 commit into
omacom:quattrofrom
fresh3nough:fix/10533-dimtext-wcag-contrast
Open

Raise themed readable-text mixes to WCAG AA contrast#10571
fresh3nough wants to merge 1 commit into
omacom:quattrofrom
fresh3nough:fix/10533-dimtext-wcag-contrast

Conversation

@fresh3nough

Copy link
Copy Markdown

Summary

Fixes #10533.

Readable text tokens derived as mix(foreground, background, N%) used fixed high blends toward the background. On low-headroom first-party themes that left UI text below WCAG AA 4.5:1:

token old mix themes below 4.5:1 worst
pi.json.tpl dimText 52% 19/22 2.17:1
pi.json.tpl mutedText 34% 5/22 3.08:1
claude.json.tpl inactive 40% 10/22 2.72:1
claude.json.tpl inactiveShimmer 25% 2/22 3.70:1
shell.toml.tpl lock placeholder 34% 5/22 3.08:1

These map to actual readable UI (thinkingText, syntaxComment, quotes, lock placeholder), not pure decoration.

Change

token new mix
dimText / inactive 16% toward background
mutedText / inactiveShimmer / lock placeholder 10% toward background

Hierarchy is preserved (muted stays closer to foreground than dim). Measured after the change: 0/22 themes below 4.5:1, minimum dim contrast 4.55:1 (rose-pine).

Evidence

Reproduced from shipped themes/*/colors.toml only (no hardware):

old dimText @52%   below AA: 19/22  worst=2.17:1
new dimText @16%   below AA:  0/22  min=4.55:1
bash test/shell.d/theme-dimtext-contrast-test.sh
# checked 22 themes x 5 readable-text mixes
# ok - themed readable-text mixes stay at or above WCAG AA 4.5:1

Test plan

  • Pre-fix contrast scan across all 22 first-party themes
  • Post-fix contrast scan: all readable-text mixes >= 4.5:1
  • bash test/shell.d/theme-dimtext-contrast-test.sh
  • Optional: omarchy theme set a low-headroom theme (e.g. rose-pine) and spot-check lock placeholder / Pi thinking text

dimText, mutedText, inactive, inactiveShimmer, and lock placeholder were
fixed blends toward the background. On low-headroom themes that left
readable UI text below WCAG AA 4.5:1 (19/22 themes for dimText at 52%).

Lower the blend amounts so every first-party colors.toml theme clears
4.5:1 while keeping muted tokens closer to the foreground than dim ones.
Add a shell test that locks the template percentages and the contrast
floor across all first-party themes.

Fixes omacom#10533

Signed-off-by: fresh3nough <anonwurcod@proton.me>
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.

Themed dimText falls below WCAG AA contrast on 19 of 22 first-party themes

1 participant