Dark Mode Is a Different Beast in HTML Email

On the regular web, the CSS prefers-color-scheme media query is how we handle dark mode. In HTML email, that approach runs into a messier reality: email clients each handle dark mode in their own way, and the client itself may expose its own dark mode toggle.

Three Possible Outcomes of a Dark Toggle

When that toggle is switched on, one of three things can happen:

  1. The app's UI turns dark, but the email is left untouched (Apple Mail does this).
  2. The client tries to apply dark mode to the email too, but only where it detects light areas. Those areas go dark while already-dark areas stay as they are (Outlook.com behaves this way).
  3. The client force-inverts the email's colors outright (the Gmail app on iOS 13 does this).

That third behavior is the strangest. In Alice Li's words, it is "the most invasive color scheme": it inverts light-background areas and also affects dark backgrounds, so an email already designed with a dark theme is ironically forced to become light.

The full guide is available at the direct link below.