Introduction
Dark mode has become one of the most important considerations in modern email development. Many recipients read email with dark mode enabled on their phone, desktop or mail application.
The problem is that dark mode in email does not behave like dark mode on a website. On a website, I can control the entire interface and define exactly how the page changes between light and dark themes. With email, the recipient's mail client can influence what happens to the HTML and colors.
This is why a design that looks perfect in light mode can suddenly have a bright white section, a black logo disappearing into a dark background, an unreadable CTA or an image that looks completely out of place.
From my experience: Dark mode needs to be considered while building the email, not after the light-mode version is finished. Retrofitting dark mode at the end often creates more problems than it solves.
In this guide, I will explain the techniques I actually use, what I test, where dark mode becomes unpredictable and how I design emails that remain usable even when the client modifies colors automatically.
My First Dark-Mode Lesson
One of the first things I learned from production email testing is that dark mode is not a simple CSS switch.
A developer can write a dark-mode media query, change the body background and text color, and still end up with a broken-looking email.
Why? Because different email clients can support, interpret or transform dark-mode styles differently.
I have seen situations where the main content changed correctly but a logo did not, where a background became dark but a nested section remained bright, and where a button needed additional attention.
The lesson: I do not consider dark mode complete when the CSS is written. I consider it complete when the important components have been rendered and reviewed in the target email clients.
What Does Dark Mode Actually Mean in Email?
In a website, dark mode usually means that the application switches between two controlled themes.
In email, there are several possibilities:
- The email client respects your dark-mode CSS.
- The client partially changes your colors.
- The client automatically modifies light colors.
- The client leaves some elements unchanged.
- The client treats images differently from HTML colors.
This is why I prefer to think of dark mode as a rendering scenario rather than simply a second stylesheet.
My goal is not always to force every pixel to a specific color. My goal is to make sure the email remains readable, accessible and visually coherent in the clients I need to support.
Why Email Dark Mode Is Complicated
There are three major challenges I consider when developing dark-mode emails.
1. CSS Support
Different clients support dark-mode selectors and properties differently.
2. Automatic Changes
Some clients may modify colors automatically rather than simply following your CSS.
3. Images
HTML colors can be changed with CSS, but an image contains its own pixels and needs a different strategy.
These three areas are why I test dark mode at the component level rather than assuming that one global rule will solve everything.
Declaring Dark-Mode Support
When I am building a campaign that needs explicit dark-mode support, I first communicate that intent in the email document.
A commonly used approach is to include the color-scheme metadata:
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
The purpose is to indicate that the email supports light and dark color schemes. It does not mean every email client will render the email identically.
Important: I treat these declarations as part of the dark-mode strategy, not as a replacement for actual rendering tests.
Using Dark-Mode CSS
For clients that support the relevant media query, I can define dark-mode overrides using:
@media (prefers-color-scheme: dark) {
.email-bg {
background-color: #111111 !important;
}
.email-text {
color: #ffffff !important;
}
}
This is useful because it allows me to define an intentional dark version of important HTML elements.
I generally prefer using classes for components that need a dark-mode override instead of trying to target every element globally.
<td class="email-bg"
style="background-color:#ffffff;">
<h2 class="email-text"
style="color:#111111;">
Your heading
</h2>
</td>
Then the dark-mode layer can override those classes where supported.
Specificity and Overrides Matter
Email HTML often contains inline styles. That makes dark-mode overrides more challenging because the inline declaration can have higher priority than a normal stylesheet rule.
This is one reason I frequently use !important on
carefully selected dark-mode overrides.
@media (prefers-color-scheme: dark) {
.dark-bg {
background-color:#111111 !important;
}
.dark-text {
color:#ffffff !important;
}
}
I do not use !important everywhere. I use it deliberately
on the styles that need to override the light-mode inline value.
My approach: Keep the light-mode styles explicit, give dark-mode components clear class names and override only what actually needs to change.
Background Colors: Start With the Foundation
Background colors are one of the first things I check in dark mode.
A typical light-mode email might use a white page background and a white content card. If the client changes only the outer background, the inner card may remain bright white.
I therefore think about the email as multiple background layers:
Body / outer background
↓
Main container
↓
Content section
↓
Card / module
↓
CTA / footer
Each important layer needs to be reviewed in dark mode.
I also avoid using pure black everywhere. A very dark gray can provide
a more comfortable visual hierarchy than turning every surface into
#000000.
Text and Link Colors
Changing the background without changing the text is one of the easiest ways to create an inaccessible dark-mode email.
If the light-mode text is dark gray on white, that same dark gray may become almost invisible on a dark background.
I therefore identify the different text roles:
- Primary heading
- Body copy
- Secondary copy
- Legal text
- Links
- CTA text
- Footer content
Each role should remain readable rather than simply receiving the same white color.
@media (prefers-color-scheme: dark) {
.body-text {
color:#eeeeee !important;
}
.secondary-text {
color:#bdbdbd !important;
}
.email-link {
color:#7dd3fc !important;
}
}
I always check contrast visually and with accessibility tools where appropriate.
Images and Logos: The Hardest Part of Dark Mode
CSS can change HTML colors, but it cannot directly recolor the pixels inside a normal image.
This creates a common problem: a logo designed for a white background may be dark and almost invisible when the email background becomes dark.
Before development, I check the brand assets and ask:
- Does the logo have a transparent background?
- Is there a light logo variant?
- Can the image work on both backgrounds?
- Does the design need a separate dark-mode asset?
- Will the client automatically alter the image or surrounding area?
Whenever possible, I prefer an asset strategy that remains readable without depending on fragile image manipulation.
Transparent PNGs and Icons
Transparent images can be particularly tricky because the surrounding background changes while the image itself stays the same.
For example, a black transparent PNG may look perfect on white but disappear on a dark background.
This is why I inspect transparent assets separately during dark-mode QA rather than assuming that a transparent image will automatically work.
For important brand assets, having both light and dark variants can make the production workflow much more reliable.
Automatic Color Inversion: The Part You Cannot Fully Control
One of the most important things to understand about email dark mode is that some clients can apply their own transformations.
That means your carefully written CSS is not always the only thing controlling the final pixels on screen.
This is why I avoid designing a dark-mode strategy that depends on exact control over every color in every client.
What I Can Control
My HTML structure, CSS overrides, classes, fallback colors, assets and component design.
What I Cannot Fully Control
How every email client interprets, transforms or automatically adjusts the final email.
The practical goal is therefore resilience: build the email so that client-side transformations do not destroy readability or hierarchy.
Outlook Considerations
Outlook needs its own place in the dark-mode testing plan because Outlook environments can render HTML and CSS differently.
I pay particular attention to:
- Background colors
- Text colors
- Buttons
- Background images
- VML-based components
- Table structure
- Fallback colors
I also make sure that an Outlook-specific solution does not accidentally break the standard HTML version used by other clients.
My approach: Dark-mode fixes should be layered onto a stable email structure. I do not want the dark-mode implementation to make the base email unnecessarily fragile.
Gmail Considerations
Gmail is an important part of my dark-mode QA because the final appearance depends on the Gmail environment being tested.
I check the actual delivered email rather than relying only on a desktop browser preview.
The areas I look at include:
- Background transformation
- Text readability
- Link colors
- Button appearance
- Images and logos
- Mobile rendering
Gmail testing is especially important because a CSS rule that looks correct in one environment does not automatically guarantee identical behavior everywhere.
Apple Mail Considerations
Apple Mail generally gives developers useful support for modern email styling, but I still test it separately rather than assuming that one successful dark-mode implementation covers every client.
I pay attention to the intended color scheme, text contrast, images, links and the overall visual hierarchy.
Apple devices are also important for mobile QA because the email experience combines dark mode with a smaller viewport, touch targets and different typography behavior.
My Dark-Mode Testing Workflow
I treat dark-mode testing as a separate QA stage rather than simply checking whether the email has a dark background.
Light-mode design
↓
HTML email build
↓
Responsive/mobile check
↓
Dark-mode CSS
↓
Gmail check
↓
Outlook check
↓
Apple Mail check
↓
Logo / image review
↓
CTA / contrast review
↓
Accessibility check
↓
Litmus / BrowserStack validation
↓
Final QA
In my workflow, I have used Litmus and BrowserStack as part of rendering and device validation.
I also manually inspect the email because dark-mode issues are often visual and contextual. A screenshot can tell me that a color changed, but I still need to decide whether the resulting hierarchy and readability are acceptable.
Common Dark-Mode Email Mistakes
- Adding dark-mode CSS at the very end. Dark mode should influence component and asset decisions from the beginning.
- Changing only the body background. Nested cards, sections and footers may still have light backgrounds.
- Forgetting text colors. Dark text on a dark background quickly becomes unreadable.
- Ignoring logos and transparent images. A logo that works on white may disappear on dark gray.
- Assuming one CSS rule works everywhere. Email clients can behave differently.
- Not testing buttons. The primary CTA needs to remain visible and accessible.
- Using pure black and pure white everywhere. A controlled range of dark and light tones often creates a better hierarchy.
- Testing only on desktop. Mobile dark mode is part of the actual recipient experience.
- Trying to force complete pixel-level control. Some client-side transformations cannot be fully controlled.
Best Practices I Follow
- Plan dark mode during the design stage.
- Identify the target email clients before development.
- Use clear classes for elements that need dark-mode overrides.
- Keep light-mode styles explicit and predictable.
- Use dark-mode overrides deliberately rather than globally.
- Use
!importantwhere an override genuinely needs it. - Review every major background layer.
- Review all primary and secondary text colors.
- Test links and CTA contrast.
- Check logos, transparent PNGs and icons.
- Provide suitable fallback colors.
- Test both desktop and mobile.
- Test Gmail, Outlook and Apple Mail as required by the audience.
- Use Litmus or BrowserStack when available.
- Perform a final manual visual QA.
My biggest dark-mode lesson: The best dark-mode email is not the one with the most CSS. It is the one that remains readable and visually intentional when the email client does something you did not expect.
FAQ
Does every email client support dark mode in the same way?
No. Dark-mode support and behavior vary between email clients and platforms. This is why I test the actual clients required by the campaign rather than relying on one preview.
Can I force an HTML email to look exactly the same in dark mode everywhere?
Not reliably. Some clients can transform colors automatically or interpret dark-mode CSS differently. The practical goal is to build a resilient experience rather than depend on absolute pixel-level control.
Should I use prefers-color-scheme in HTML email?
It can be useful for clients that support the relevant dark-mode behavior. I use it as part of a broader strategy rather than assuming that it controls every email client.
Why does my logo disappear in dark mode?
The logo image itself may have been designed for a light background. CSS can change the surrounding HTML colors, but it does not automatically create a suitable dark version of the image.
Should I create separate light and dark logos?
When the brand asset requires it, having suitable light and dark variants can make the email much more resilient. The correct approach depends on the asset, design and supported clients.
How do I test dark-mode emails?
My workflow includes actual email-client rendering checks, mobile testing, contrast review, image and logo checks, accessibility validation and rendering tools such as Litmus and BrowserStack.
Is dark mode the same as simply using a black background?
No. Good dark-mode email design considers the complete visual system: backgrounds, text, links, buttons, images, logos, borders, hierarchy and accessibility.
Conclusion
Dark mode is now an important part of professional HTML email development, but it should not be treated as a simple “black version” of the light email.
The real challenge is that email clients can behave differently. Some follow your CSS, some partially support it and some can modify colors automatically.
That is why my approach is to build for resilience: use intentional dark-mode CSS, control important HTML colors, choose assets carefully, protect the CTA, consider accessibility and test the actual clients.
After working on production email campaigns and troubleshooting cross-client rendering issues, I have found that dark mode becomes much easier when it is considered from the beginning of the design and development process.
Do not wait until the final day of QA to turn on dark mode. Test it while the components are still easy to change.
Continue Learning HTML Email Development
Explore more practical guides on responsive HTML email development, Outlook compatibility, accessibility, testing and production email workflows.
Back to Blog Get In TouchGet My Free HTML Email Developer Toolkit
Get my practical HTML email developer toolkit with useful resources, reusable techniques, QA guidance and production-ready email development tips.