A large share of recipients now read email with a dark theme on their phone or computer. Their mail client changes the colours of your message to fit: light backgrounds become dark, dark text becomes light, and sometimes your carefully chosen brand colours become something else. If you did nothing to prepare, the results can range from perfect to unreadable: a dark logo on a dark background, white text on a pale button, a white box around a product photo. Dark mode in email is not one feature but several different behaviours, varying by client, app and even platform. This guide explains how the main clients transform colours, which parts of your design they leave alone, how to write HTML and CSS that survive each approach, how to handle logos and images, how to keep contrast accessible and how to test. As client behaviour changes with updates, treat the details as a starting point and test with current versions.
What the clients do
| Behaviour | What happens | Typical clients | Your control |
|---|---|---|---|
| No change | The message is shown as designed; only the client interface goes dark | Many web clients when the setting is off; Apple Mail respects the message design if it declares support | Full |
| Partial inversion | Light backgrounds are darkened and dark text lightened; already-dark colours are kept | Several mobile apps | Limited; use explicit colours and test |
| Full inversion | All colours are inverted algorithmically, including images in some cases | Some Outlook apps and Gmail on some platforms | Little; design so the result stays legible |
| Custom styles via media query | The client applies your prefers-color-scheme: dark styles | Apple Mail, some Outlook versions and others | Full for those clients |
Because one message reaches all these clients, aim for a design that survives automatic changes and add a dark-specific stylesheet as an enhancement where supported. See CSS in HTML email for general support information.
Declare support and add dark styles
<head>
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<style>
:root { color-scheme: light dark; supported-color-schemes: light dark; }
.bg { background-color: #ffffff; }
.txt { color: #222222; }
@media (prefers-color-scheme: dark) {
.bg { background-color: #121212 !important; }
.txt { color: #f1f1f1 !important; }
.logo-light { display: none !important; }
.logo-dark { display: block !important; max-height: none !important; }
}
/* Outlook.com / Outlook app hooks */
[data-ogsc] .txt { color: #f1f1f1 !important; }
[data-ogsb] .bg { background-color: #121212 !important; }
</style>
</head>The meta tags tell clients that you have considered both schemes, and some then leave your colours alone. The media query applies your own dark palette. The attribute selectors target Outlook's web and app renderers, which add attributes to elements they have recoloured. Support changes, and Gmail strips or ignores some of this, so never make the dark styles the only way the email works.
Colour rules that survive inversion
- Set colours explicitly. Define background and text colours on every container. A missing background lets the client choose, and the choice may clash with your text colour.
- Avoid pure white and pure black. Algorithms flip them to the opposite extreme. Slightly off-white (#fafafa) and off-black (#1a1a1a) often invert more gracefully.
- Pick brand colours with enough luminance range. Mid-tones such as medium blue or green stay visible on both light and dark backgrounds; extreme pastels or very dark navy may vanish on one of them.
- Keep contrast ratios healthy in both themes. Aim for at least 4.5 to 1 for body text. Test your link colour on dark grey; a dark blue link becomes invisible.
- Do not rely on colour alone to carry meaning, such as red for errors; add an icon or text.
- Buttons: use a solid background colour with high-contrast text and, if needed, a visible border so the button remains a button after inversion. See bulletproof buttons.
Logos and images
- Transparent PNG logos work well on any background if the artwork is visible on both light and dark. A dark logo on transparency disappears in dark mode.
- Add a thin light outline or glow to dark logos, or place the logo on a small light badge, so that it survives on dark backgrounds.
- Provide two logo versions and swap them with the media query (as in the example): a dark logo for light mode and a light logo for dark mode. Clients that ignore the query show the default version, so make the default safe.
- Avoid JPEG images with white backgrounds as part of the design; they appear as bright rectangles in dark mode. Use transparent PNG or give product photos a neutral border.
- Inverted images: some clients invert images with a transparent background only; others may adjust photographs. Keep photographs natural and avoid text baked into images, which may become unreadable. See designing for blocked images.
- Icons that are single-colour should be provided in a mid-tone or with both versions.
Background images and gradients
Background images may be ignored in dark mode or have their overlay text recoloured. Always set a solid fallback colour on the container, make text colour independent of the image where possible and avoid light-on-light gradients that become dark-on-dark. For Outlook, VML backgrounds are not recoloured in the same way; test them.
Testing
- Send tests to accounts in Apple Mail (macOS and iOS), Gmail (iOS, Android and web), Outlook (Windows classic, new Outlook, macOS, web and mobile) and at least one Android default mail app.
- Switch each client between light and dark, and where possible between the modes of "dark" (some have a setting to keep emails in their original colours).
- Check every element: logo, headings, body, links, buttons, footers, icons, photos and dividers.
- Check images-off and dark mode together; the alt text colour matters.
- Use a preview tool for coverage but confirm important templates on real devices.
- Record which client has which problem and keep a fix list for the template.
A short worked example
Consider a newsletter with a white background, dark grey text, a navy logo and an orange button. In full inversion the background turns near-black, the text turns light grey, and the navy logo almost disappears against it. The orange button may keep its colour, which is fine. The repair is small: give the logo a white outline in the image file, set the text and background colours explicitly so the inversion has less to guess, and add a dark stylesheet that supplies a light logo variant for the clients that read it. Retest, and the same message is legible in both themes with no change to the brand.
Accessibility and preferences
Dark mode is often chosen for comfort or because of low-vision needs, and a message that is unreadable in it is an accessibility failure. Provide sufficient contrast, avoid thin light-grey text and let the system decide when no better choice exists. Honour the reader's choice and do not try to force a theme. See accessible HTML email and dark mode for further accessibility points.
Plain-text style emails
Messages designed to look like personal mail, with little or no styling, behave best: the client applies its own text and background colours. For transactional and outreach messages that need no heavy branding, this is the simplest path to correct dark rendering. See how long an email should be for related guidance on keeping messages simple.
Dark mode will not go away, and the fix is not a single trick. Set colours explicitly, choose logos and images that work on both backgrounds, add dark styles for the clients that support them and test in the clients your audience uses.
Send well-formed HTML email Reliable multipart delivery with correct encoding and headers.
References and further reading
Frequently asked questions
Why does my email look different in dark mode?
Mail clients adjust colours automatically, sometimes inverting backgrounds and text, so designs without explicit colours or with dark logos can become hard to read.
Does every client support prefers-color-scheme?
No. Apple Mail and some Outlook versions do; others ignore it. Use it as an enhancement over a design that survives automatic changes.
How do I make a logo work in dark mode?
Use a transparent PNG with an outline or badge, or provide two versions and swap them with the media query.
Should I use pure white and black?
Avoid them. Slightly off-white and off-black invert more gracefully, and mid-tone brand colours stay visible.
How do I test dark mode?
Send to real accounts in Apple Mail, Gmail and Outlook on desktop and mobile, switch between light and dark, and check logos, links and buttons.