Dark Mode Design System Tokens
Semantic color roles, elevation, and contrast rules that work in light and dark themes.
Nestlancer Editorial

Dark mode fails when teams invert hex values without rethinking elevation and semantic roles. Tokens express intent—surface-raised, text-primary—not literal colors.
Semantic color roles
bg.canvas,bg.subtle,bg.elevatedtext.primary,text.muted,text.inverseborder.default,border.focusstatus.success,status.warning,status.error
Map each role in light and dark with verified contrast pairs.
Elevation without gray mush
Dark UI uses lighter surfaces for higher elevation—not shadows alone:
| Level | Dark theme approach |
|---|---|
| Base | Near-black canvas |
| Card | +4–6% lightness |
| Modal | +8–10% lightness |
Contrast rules
Body text still needs 4.5:1 against its surface. Muted text is the common failure—test #94a3b8 on #0f172a explicitly.
Implementation
:root { --text-primary: #0f172a; }
[data-theme="dark"] { --text-primary: #f1f5f9; }
Prefer data-theme over prefers-color-scheme alone—user toggle must win.
Dark mode is a first-class theme—design it alongside light, not as an afterthought filter.
Comments
Loading comments…
Related posts

Design
Brand Identity for Digital-First Products
Logo systems, voice, and visual language that survive app icons and social crops.

Design
Design Ops for Growing Product Teams
Rituals, tooling, and intake processes that keep design shipping with engineering.

Design
Inclusive Design Beyond Compliance Checklists
Cognitive accessibility, plain language, and trauma-informed patterns.

Design
Data Visualization UX for Dashboards
Chart selection, color semantics, and drill-down patterns for decision makers.