Skip to content

Darken status words on light themes so they clear 4.5:1. - #1275

Merged
calledtoconstruct merged 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/status-text-contrast
Dec 5, 2026
Merged

calledtoconstruct merged 1 commit into
MyOwnDataCenter:mainfrom
calledtoconstruct:fix/status-text-contrast

Conversation

@calledtoconstruct

@calledtoconstruct calledtoconstruct commented Dec 5, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Status words (running, warnings, and errors) on Daylight, Linen, and Sky are darker, and Ember's red errors are a step lighter, so they clear 4.5:1 on the page. Charts, dots, icons, and buttons keep the bright colours.

Fixes #498.

How you tested it

  • npm run typecheck, npm run build and npm test pass
  • Tried on a real Omarchy machine or VM (say which), if it touches install.sh, the helper, apps, machines or storage

Ran node --experimental-strip-types --import ./test/retry-rm.mjs --test --test-concurrency=1 test/muted-text-contrast.test.mjs (13 passed) and npx tsc --noEmit -p web.

Anything to know

Leaves the version number and What's New to the maintainer. The bright fills (--green, --yellow, --peach, --red) are unchanged. Ember's red text is lighter, not darker: that page is darker than the red, so darkening it would fail contrast.

Gauge alerts, the Reviewed badge, the provider check line, and swarm alerts share a colour with an icon. The words use the text token; the icons stay on the fill. Menu and delete buttons that paint an icon and a label with the same red were left alone.


Note

Low Risk
Theming and CSS only—no auth, data, or API changes—though many UI surfaces switch text color tokens.

Overview
Introduces -text CSS variables (--green-text, --yellow-text, --peach-text, --red-text) so status and error copy can meet WCAG 4.5:1 on each theme’s page background while --green / --yellow / --red / --peach stay unchanged for dots, icons, charts, and button fills.

On Daylight (latte), Linen, and Sky, those tokens are darkened relative to the fills; on Ember (gruvbox) --red-text is slightly lighter than --red because the page is darker than the red. Default/dark themes mostly alias -text to the fill.

styles.css and several screens (ui.tsx StatusPill, gauges, errors, swarm alerts, etc.) now color words with -text and, where icon + label share a row, often keep icons on the fill via separate rules.

Adds a muted-text-contrast test that every theme’s status text tokens hit ≥4.5:1 on --bg and match darkenForTextOn / lighten when the fill alone fails contrast.

Reviewed by Cursor Bugbot for commit 61e1446. Bugbot is set up for automated code reviews on this repo. Configure here.

Running, warning, and error text on Daylight, Linen, and Sky is darker, and Ember's red errors are a step lighter, so those words clear 4.5:1. Dots, icons, charts, and buttons keep the bright colours.

Fixes MyOwnDataCenter#498

Co-Authored-By: Grok 4.7

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 61e1446. Configure here.

Comment thread web/src/ui.tsx
export function StatusPill({kind, label}: {kind: StatusKind; label: string}) {
return (
<span className={`pill${kind === 'busy' ? ' busy' : ''}`} style={{'--c': STATUS_COLOR[kind]} as CSSProperties}>
<span className={`pill${kind === 'busy' ? ' busy' : ''}`} style={{'--c': STATUS_COLOR[kind], color: STATUS_INK[kind]} as CSSProperties}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Status ink fails on tinted fills

Medium Severity

Status ink is darkened only until it clears 4.5:1 on the page. StatusPill, failed transfer counts, and the What's New fix tag then draw that ink on a translucent mix of the brighter fill, so the rendered contrast falls back under 4.5:1 on Daylight, Linen, and Sky.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 61e1446. Configure here.

@calledtoconstruct
calledtoconstruct merged commit bc473eb into MyOwnDataCenter:main Dec 5, 2026
2 checks passed
@calledtoconstruct

Copy link
Copy Markdown
Collaborator Author

Thank you @nixfred. Status words on Daylight, Linen, and Sky are darker, and Ember's red errors are a step lighter, so they clear 4.5:1. Charts, dots, icons, and buttons keep their colour. Merged.

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.

Muted text is below 4.5:1 in the Daylight theme and in the Omarchy theme's default colours; Daylight status text is 2.3 to 3.3:1

1 participant