Skip to content

fix(theme): readable light-mode primary, decoupled CRT glow - #27

Merged
amrtgaber merged 1 commit into
mainfrom
fix/light-mode-primary-contrast
May 30, 2026
Merged

fix(theme): readable light-mode primary, decoupled CRT glow#27
amrtgaber merged 1 commit into
mainfrom
fix/light-mode-primary-contrast

Conversation

@amrtgaber

Copy link
Copy Markdown
Contributor

The light-mode --primary ("icy blue", oklch(0.88 0.08 210)) was unreadable as text — about 1.29:1 against the light background, far below the WCAG AA 4.5:1 floor. It affected every text-primary surface: privacy/terms links, the .gg/BIT wordmark, the 404 & Error headings, the brand icon, and the link button variant.

Root cause

--primary served two conflicting roles:

  1. The always-bright phosphor glow on the home page's CRT screen, which is bg-black in both themes.
  2. The semantic UI color, which must be readable on light surfaces in light mode.

Darkening it for (2) would have muddied the signature CRT glow for (1).

Changes

  • Decouple the CRT: new theme-independent --crt-primary: oklch(0.82 0.11 220). All crt.css glow rules now reference it, so the home page glows identically in light and dark mode.
  • Retune light-mode --primaryoklch(0.5 0.15 225) (#0071a2) — same icy-blue hue family, now 4.95:1 on the background. Mirrored to --ring and --chart-1.
  • Flip light-mode --primary-foreground to near-white so bg-primary buttons, avatars, and text selection stay legible (white-on-primary 5.09:1).

Contrast verified numerically (oklch → sRGB → WCAG) and visually in both themes; the CRT glow is unchanged.

Closes #25

Light-mode --primary (icy blue, oklch 0.88 0.08 210) scored ~1.29:1 as
text — unreadable, far below WCAG AA 4.5:1 — affecting every text-primary
surface (links, wordmark, 404/Error headings, brand icon, link buttons).

It conflated two roles: the always-bright CRT phosphor (screen is bg-black
in both themes) and the semantic UI color that must read on light surfaces.

- Add theme-independent --crt-primary (oklch 0.82 0.11 220); crt.css glow
  now references it, so the home page glows identically in both themes.
- Retune light --primary to oklch 0.5 0.15 225 (#0071a2), same hue family,
  4.95:1 on background; mirror to --ring and --chart-1.
- Flip light --primary-foreground to near-white so bg-primary stays legible
  (white-on-primary 5.09:1).
@netlify

netlify Bot commented May 30, 2026

Copy link
Copy Markdown

Deploy Preview for criticalbit-web ready!

Name Link
🔨 Latest commit 8a3c5e4
🔍 Latest deploy log https://app.netlify.com/projects/criticalbit-web/deploys/6a1a3d0056eec200089c47cb
😎 Deploy Preview https://deploy-preview-27--criticalbit-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@amrtgaber
amrtgaber merged commit 351a343 into main May 30, 2026
6 checks passed
@amrtgaber
amrtgaber deleted the fix/light-mode-primary-contrast branch May 30, 2026 01:47
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.

icy blue is not readable text in light mode

1 participant