Why dark mode is complicated in email
Unlike the web, there is no single standard for how email clients implement dark mode. Each client does something different — and some do things that actively break HTML emails.
What each client does
Apple Mail (macOS and iOS)
Apple Mail applies prefers-color-scheme: dark media queries you write, and also performs its own intelligent color inversion. White backgrounds become dark. Dark text becomes light. Images with transparent backgrounds get inverted.
This is relatively predictable if you handle it explicitly.
Gmail (iOS and Android)
Gmail applies automatic dark mode to emails that don't have explicit dark mode handling. It:
- Changes white or light backgrounds to dark
- Changes dark text to light
- Does not invert images by default
- May not apply your
prefers-color-schemestyles
This is the most unpredictable behavior.
Outlook (Windows)
Outlook on Windows does not support prefers-color-scheme media queries. It has its own dark mode behavior that may differ from CSS-based approaches.
Outlook.com
Outlook.com has partial dark mode support and applies automatic inversions.
The most common problems
1. Hardcoded white backgrounds become dark
<!-- Problematic -->
<td style="background-color: #ffffff;">
<!-- Better -->
<td style="background-color: #ffffff;" class="bg-white">
2. Transparent logos invert
White logos on transparent backgrounds become black logos on dark backgrounds. Solutions:
- Add a white or brand-colored rectangular background to the logo image
- Use a dark-mode version of the logo via
prefers-color-scheme - Add a solid background to the logo container
3. Low contrast after inversion
Colors that were readable on white may be unreadable after dark mode inversion. Common examples:
- Light gray text (
#999999) on white — may remain light gray on dark gray - Colored text that falls in the mid-range — may lose contrast in both modes
How to handle dark mode
Method 1: Accept automatic inversion
If your email uses high-contrast black text on white background, automatic inversion often produces acceptable results. Ensure:
- No transparent images that could invert badly
- No logo white on transparent background
- High contrast text
Method 2: prefers-color-scheme media queries
<style>
@media (prefers-color-scheme: dark) {
.email-wrapper { background-color: #1a1a1a !important; }
.email-body { background-color: #242424 !important; }
.email-text { color: #e0e0e0 !important; }
}
</style>
Supported in Apple Mail and Samsung Mail. Not in Gmail.
Method 3: Force light mode
You can attempt to opt out of automatic dark mode transformation in Gmail:
<meta name="color-scheme" content="light" />
<meta name="supported-color-schemes" content="light" />
This signals to Gmail that your email only supports light mode. Results vary and Gmail may override this.
What we cannot guarantee
This is a rapidly changing area of email client behavior. No analysis tool — including the Dark Mode Analyzer in EmailingSimply — can guarantee how a specific email will render in dark mode. We analyze common patterns and known issues. Testing in real clients is always recommended.
Testing dark mode
The only reliable way to test dark mode is in real clients:
- Apple Mail: Use a Mac or iOS device with dark mode enabled in system settings
- Gmail: Enable dark mode in the Gmail app settings
- Litmus or Email on Acid: Screenshot-based testing services provide dark mode renders
Resources
- Can I Email dark mode support table
- Apple Mail developer documentation