Skip to content

feat(ui): rework dark-mode palette to near-OLED (Dark-Reader-inspired)#58

Merged
ringo380 merged 1 commit into
mainfrom
feat/dark-mode-near-oled-palette
May 13, 2026
Merged

feat(ui): rework dark-mode palette to near-OLED (Dark-Reader-inspired)#58
ringo380 merged 1 commit into
mainfrom
feat/dark-mode-near-oled-palette

Conversation

@ringo380
Copy link
Copy Markdown
Owner

Summary

Replace the GitHub-Primer-style dark palette with the surface tokens planted (but never wired) in Slice C. Single mechanical hex swap across dark-mode.css and the four templates carrying inline dark:bg-[#…] arbitrary values.

Role Before After
Page background `#0d1117` `#0a0a0a`
Card / panel surface `#161b22` `#111113`
Border `#30363d` `#1f1f23`
Ink (primary text) `#e6edf3` `#e7e5e0`
`bg-slate-100/800` dark override `#21262d` `#17181c`
Hover lift `#2d333b` `#25272d`

Why

Side-by-side screenshots showed Dark Reader's auto-rework reading noticeably warmer, blacker, and more "dev tool" than the native dark theme. The UX-pass critique (02-critique.md #8) already flagged dark mode as "light-mode-flipped" and proposed a #0a0a0a base; Slice C even planted the surface tokens but only used them for one demo surface. This wires them everywhere.

Theme toggle behavior

Unchanged. base.html already defaults to prefers-color-scheme and persists user overrides to localStorage via the .theme-toggle button — that established in the original dark-mode shipping work. No new toggle, no migration.

Test plan

  • python manage.py check → 0 issues (passes)
  • Smoke-rendered /, /login/, /register/ → 200
  • Toggle dark mode on every in-scope page (/, /grade/, /grade/results/<id>/, /history/, /account/); verify no contrast regression
  • System toggle: switch macOS appearance — site flips when localStorage override is absent
  • CodeMirror editors render against new card surface (not the old #161b22)
  • Grade pills, severity dots, line-highlight .qg-line-issue background still distinct against new bg

Swap the GitHub-Primer dark palette for the surface tokens planted in
Slice C, mechanical hex-by-hex across dark-mode.css and the four
templates with inline dark:bg-[#…] arbitrary values:

  page bg     #0d1117 → #0a0a0a  (near-OLED, matches --qg-surface)
  card / panel #161b22 → #111113  (1-step lift, matches --qg-surface-2)
  border      #30363d → #1f1f23  (subtle, matches --qg-border)
  ink         #e6edf3 → #e7e5e0  (warm cream, less blue cast)
  bg-slate-100/800 override #21262d → #17181c (track the new card surface)
  hover lift  #2d333b → #25272d  (one step above card)

Why: the previous palette was a GitHub-Primer copy and the recent UX
critique flagged dark mode as "light-mode-flipped." With Dark Reader
enabled the user found the page noticeably warmer, blacker, and more
dev-tool-like; this rework matches that target with a single palette
swap instead of a per-component rebuild.

System theme toggle behavior is unchanged — base.html already defaults
to prefers-color-scheme and persists user overrides to localStorage.
@ringo380 ringo380 merged commit 9e515b0 into main May 13, 2026
@ringo380 ringo380 deleted the feat/dark-mode-near-oled-palette branch May 13, 2026 17:46
ringo380 added a commit that referenced this pull request May 14, 2026
The near-OLED palette swap (PR #58) lowered surface luminance but left
every accent at light-mode saturation, so primary CTAs, the selected DB
chip, and the emerald credits pill now punch harder than the headings.
Three targeted overrides in dark-mode.css, no template churn.

1. Primary indigo CTA mute: at-rest .bg-indigo-600 drops to indigo-700
   (#4338ca) instead of indigo-600 (#4f46e5). Hover bumps to indigo-500
   (#6366f1) — inverting the affordance direction vs light mode (where
   hover darkens) so intent still reads as a brighten step.
2. Selected DB chip: replace dark:bg-white pure-white pill with warm
   cream (#e7e5e0). Pure white on #0a0a0a was the worst contrast on the
   page and read as a UI block, not a "this is selected" affordance.
   Scoped to [role="radio"][aria-checked="true"] so it only affects the
   chip group and not any other dark:bg-white usages.
3. Emerald credits pill text: emerald-300 (#6ee7b7) → emerald-400
   (#34d399). Still distinct against the rgba(16,185,129,0.22) bg,
   ~30% less luminous. Applies to all grade-A pills consistently.

Held off on softening the wordmark (#a5b4fc) and the Q-ring logo
strokes — those are brand-identity calls and deserve a deliberate
decision rather than a mechanical desaturation.
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