TL;DR
  • Dark mode is a design system problem, not a CSS toggle
  • Use semantic colour tokens, not hex values, in components
  • Elevation shifts lighten surfaces in dark, darken shadows in light
  • Don’t just invert — contrast ratios change meaning
  • Respect prefers-color-scheme and remember user preference

Inverting your colour palette isn’t dark mode. It’s a reverse-stylesheet. Real dark mode is a design system decision about semantic colour, elevation, and contrast — applied consistently across every component.

Phase 01 · Semantic tokens

Think surface, not grey

Your components shouldn’t know whether they’re in light or dark mode. They should reference semantic tokens: surface, surface-elevated, text-primary, text-secondary. The mode layer below decides what those resolve to.

Phase 02 · Elevation inversion

Lighter = higher in dark, darker = higher in light

In light mode, elevated surfaces have deeper shadows. In dark mode, elevated surfaces are slightly lighter than the base. A modal that’s white-on-white elevated in light becomes a lighter-grey over dark in dark mode. Shadows still exist but carry less weight.

Phase 03 · Contrast audit

Dark mode reveals contrast bugs

Text that barely passed WCAG AA on a white background often fails on dark. Brand colours that sing on white look muddy on dark. Audit every token pairing with a contrast checker. Plan for tinted variants of brand colours for dark mode.

Phase 04 · User preference

System preference first, stored preference second

Default to prefers-color-scheme. If the user toggles manually, store that preference. Sync across tabs. Apply before first paint to avoid flash-of-wrong-theme. All three of those matter.

Dark mode is table stakes now. We build it into every product under Logicore.