Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(theme): use dark text on success-green backgrounds for WCAG AA contrast

[._.]/ Adam Eivy64fe24c1abea
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index bae90f8ca4..8f82b83867 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -1215,6 +1215,22 @@
## Fixed
+- **Theme contrast: white text on light-green success backgrounds now uses
+ dark text.** `--port-on-success` defaulted to white (255 255 255), which
+ fails WCAG AA against bright/medium-bright greens (white on #22c55e ≈ 2.0,
+ on #16a34a ≈ 3.3). The base token now routes to dark forest green
+ (5 46 22) — fixes Classic Midnight, Classic Noon, and Lumen Glass Day,
+ where the `bg-port-success text-white` mapping in `index.css` (lines
+ 336-338) now produces readable contrast (≥ 4.6). Darker-green day themes
+ (Phosphor Paper #167a3c, Drafting Paper #15803d) keep white text since
+ their greens are dark enough that white passes AA (~5.0+) and dark text
+ would fail. Added a defensive CSS rule that routes hardcoded Tailwind
+ `bg-green-{400,500,600}` / `bg-emerald-{400,500,600}` / `bg-lime-{400,500}`
+ + `text-white` combos through the same `--port-on-success` token, so
+ components that bypass the theme color (DataDog/Jira/SoulWizard buttons,
+ etc.) inherit the fix automatically. Touches `client/src/themes/portosThemes.js`,
+ `client/src/index.css`.
+
- **TUI agent prompt now actually lands in Claude Code's input.** The fixed
2500 ms paste delay raced Claude Code's banner/loading render, so bracketed
paste arrived before the input field was ready and the entire prompt was
diff --git a/client/src/index.css b/client/src/index.css
index 575b9c3acb..6800a8cb49 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -24,7 +24,7 @@
--port-warning: 245 158 11;
--port-error: 239 68 68;
--port-on-accent: 255 255 255;
- --port-on-success: 255 255 255;
+ --port-on-success: 5 46 22;
--port-on-warning: 17 24 39;
--port-on-error: 255 255 255;
--port-text: 229 229 229;
@@ -337,6 +337,18 @@ html[data-port-theme] [class~="bg-port-success"][class~="text-white"] {
color: rgb(var(--port-on-success)) !important;
}
+/* Hardcoded Tailwind green/emerald backgrounds with white text fail WCAG AA
+ contrast (white on #22c55e ≈ 2.0). Route through --port-on-success so themed
+ dark text wins automatically — mirrors the bg-port-success rule above for
+ components that bypass the theme token. */
+html[data-port-theme] :is(
+ .bg-green-400, .bg-green-500, .bg-green-600,
+ .bg-emerald-400, .bg-emerald-500, .bg-emerald-600,
+ .bg-lime-400, .bg-lime-500
+)[class~="text-white"] {
+ color: rgb(var(--port-on-success)) !important;
+}
+
html[data-port-theme] [class~="bg-port-warning"][class~="text-white"] {
color: rgb(var(--port-on-warning)) !important;
}
diff --git a/client/src/themes/portosThemes.js b/client/src/themes/portosThemes.js
index 694bc7a1cf..8bef21ebd5 100644
--- a/client/src/themes/portosThemes.js
+++ b/client/src/themes/portosThemes.js
@@ -4,7 +4,10 @@ const baseStatusColors = {
'--port-success': '34 197 94',
'--port-warning': '245 158 11',
'--port-error': '239 68 68',
- '--port-on-success': '255 255 255',
+ // White on #22c55e / #16a34a fails WCAG AA (~2.0 / ~3.0). Dark forest green
+ // hits ~9.5 / ~6.0 — safe for both Classic Midnight (bright green) and the
+ // light themes that inherit this default.
+ '--port-on-success': '5 46 22',
'--port-on-warning': '17 24 39',
'--port-on-error': '255 255 255',
};
@@ -243,7 +246,7 @@ export const THEMES = {
'--port-warning': '202 138 4',
'--port-error': '225 29 72',
'--port-on-accent': '255 255 255',
- '--port-on-success': '255 255 255',
+ '--port-on-success': '5 46 22',
'--port-on-warning': '255 255 255',
'--port-on-error': '255 255 255',
'--port-text': '12 30 36',