Dark mode has moved from a niche preference to a baseline expectation. Operating systems, browsers, and applications now respect the user’s system preference by default. If your website does not, it feels outdated.

It Is Not Just Inversion

Slapping a dark background on everything is a fast way to ruin your design. True dark mode requires rethinking contrast, saturation, and elevation. Pure black looks harsh on OLED screens. Elevated surfaces need subtle borders or shadows to maintain depth.

Key Considerations

  • Contrast ratios: WCAG requirements still apply, sometimes becoming harder to meet with dark backgrounds.
  • Saturation: Vibrant colors can vibrate against dark backgrounds. Desaturate slightly for comfort.
  • Images: Photos with white backgrounds can be jarring. Consider CSS blending modes or separate assets.
  • Brand colors: Your primary palette may need dark-mode variants to remain effective.

Implementation Strategy

CSS custom properties make toggling straightforward. Define a semantic color system, not just raw values. This lets you swap themes without touching hundreds of rules. Always respect the system preference, but offer manual override if possible.

Done well, dark mode feels like a premium feature. Done poorly, it looks like an afterthought.