Mitigating the Disaster That Is Dark Mode
This information is part of my presentation at Salesforce Connections 2025.
How many people really use dark mode anyway? That’s actually a fairly difficult question to answer. A 2020 article by Android Authority that says 82% of Android users have dark mode turned on and use it in apps that are optimized for it. However, it is important to note that this statistic is not specifically about email dark mode, but it does give us an impression of overall dark mode usage. When we look at email specifically, there are 2 studies from Litmus, a leading email testing company. In 2021, 28% of their opens were on dark mode. In 2022, that rose to 35%. That’s a 7% increase in dark mode opens in 1 year. That is not an insignificant number and it shows us the trend of email dark mode adoption is increasing. If we assume a steady 7% increase every year (it’s probably increasing since the adoption rate of non-email specific dark mode is increasing year over year, but just go with it ), that 56% (or more) of Litmus’ subscribers are opening in dark mode now in 2025.
If you aren’t optimizing your emails for dark mode now, you are lagging. You’re absolutely going to have to spend the time and money to update your email code for dark mode at some point; dark mode isn’t going anywhere. Why not optimize for dark mode now and get a leg up on all those other brands that lagging? So the answer to how many people really use dark mode is more than enough.
How Dark Mode is Implemented
So why is dark mode so inconsistent? The answer is that there are 2 different ways that email clients can deal with dark mode. There’s clients like Apple Mail, iOS Mail, Outlook for Mac, and Outlook iOS that respect what you tell it via code and then there’s the ones that think they know better than you.

The ones that do respect dark mode styles use what’s called the dark mode media query.
The dark mode media query allows us to write code that tells the email client how we want the dark mode version of our code to look. It is basically like telling these email clients, “hey, if you’re in dark mode when you open this email, be a peach and use these colors instead. We’re trying to save people’s eyeballs.” Apple Mail, iOS Mail and the others look at the media query, shrug, and then go on to use the dark mode colors you specified. The one exception to this is that these email clients will turn true white into true black.
caniemail.com
Then there’s basically every other email client. How they handle dark mode is written into their software. A software engineer somewhere specifically wrote instructions into the email client’s programing on how to deal with dark mode. And those instructions are, “Invert those colors no matter what!.” There is almost no amount of email code that is going to override the basic fundamentals of how these email clients render dark mode because it is determined at the software level, not the email code level.
Dark Mode Support

Let’s talk about the email clients that don’t respect dark mode styles. They will change the colors in your email in one of 2 ways. Some pick and choose which of your colors will get inverted and that’s called partial inversion. Then there are those that indiscriminately invert all your colors. That’s called full inversion.
Partial Inversion

https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers
Partial-invert email clients detect areas with light backgrounds. When it finds them, it inverts both the background color and the text color so that what was once a light background with dark text now displays with a dark background and light text. Usually, emails that begin with dark backgrounds will remain unchanged — except for Outlook’s mobile app, where light text on dark backgrounds are sometimes darkened. In general, partial-inversion email clients tend to not invert #CCCCCC or darker, as well as #333333 or lighter; so you can use these values to maintain kinda-sorta white and kinda-sorta black.
Additionally, these clients usually won’t mess with text that’s on top of background images.
Full Inversion

https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers
Lastly, there’s the full invert email clients. These guys do not care what you think makes the best dark mode for your design. They know they know better than you. They take all of your colors and invert them. No color is safe. Black becomes white, green becomes darker green, and yellow weirdly turns into an ugly brown. The text on top of your background images is inverted. If your email has a dark theme already, it will invert it to a light theme.
Design Tips for Dark Mode
Include dark mode in your style guide
Since our ability to change dark mode across the board is very limited, the best idea is to design for dark mode. If you design for dark mode, you can optimize your email even when you have no access to the code, like when you’re using a drag and drop editor. The number one suggestion I can give you is to make dark mode part of your style guide. Everyone benefits from dark mode design guidelines because everyone has realistic expectations and no one is surprised.
The very first thing I do when I get a new client is run the brand’s colors through render testing so they can see exactly what happens to them in all 3 versions of dark mode. Armed with that information, your designer can make educated decisions on what colors to use where. A helpful tip for those designers – consider using degrees of color saturation or lightness in your brand’s color palette in dark mode.
Use transparent PNGs, especially for logos and icons
Statistically, the most common background color for email is white. Since white backgrounds get inverted by all dark modes, we can make some general guidelines when it comes to images. The first is that you should use transparent PNGs instead of JPEGs with an included background color. If you use an image that has a background color as part of it, that background color will show up even in dark mode. So, like in this example, all the space around your image is now dark, but your image has a white background when opened in dark mode, which can look like a mistake.

Image from Campaign Monitor
Outline on Dark Logos and Icons
The use of transparent backgrounds can mean that if you have a dark image, like a black logo, it will get lost in dark mode. The same is true for your social media icons. The most common way to deal with a dark image and a dark background in dark mode is to include a border around the image that is the same as your email’s background color. This must be done as part of the image file. The border will be invisible in light mode, but it will help the image stand out when it’s on a dark background. If you don’t like the look of an outline, you can also do a glow or a drop shadow.

Bottom four images from Campaign Monitor
Now, you might get some push back here. I’ve had a few clients tell me that putting a border around their logo is expressly forbidden by brand guidelines. I basically put it this way:
I literally can’t stop this from happening. These email clients don’t care about your brand guidelines. They absolutely will not change for you no matter who you are, so you’re the one that has to change. So you have three choices. We put a border around the logo, put a light background behind it so it looks like a mistake, or the logo gets lost in the dark background. Those are your choices. Suck it up, buttercup. Take it up with Microsoft, Google, etc.
There is one weird quirk in Gmail app, for both Android and iOS. It will invert the colors of your images if they are below the dimensions of 15px by 15px. The easiest way to deal with this is to make all your icons the same size, and bigger than 15px by 15px.
Avoid Mixing Background Colors with Images

Image from hteumeuleu.com
Here’s something that has become a very common practice. Matching an image’s background color to the email background on which it is placed, to make it all look extended and cohesive. That may look great in light mode, but not so much in dark mode. Since images aren’t affected by dark mode but background colors are, the color in the image will no longer match the background color in dark mode. Because of this, try to avoid mixing images with background colors.
Choose Background Images With Dual-Mode Colors

The next tip is illustrated very well by Salesforce’s own Dreamforce email. On the left is the light mode and the right is dark mode. The designers knew that the navy background color would be changed to a light blue in dark mode, and made use of it. They used a background image that utilized transparent sections under where the text would be. Since both the background color and text color are inverted, we can be sure that the text will always be legible on top of this background image.
This is a pretty fancy example, so if you’re using non-transparent background images, make sure to select one where both dark and light text is easily legible. I’ve seen this done well in medium shades of green and blue, though a medium color of any shade will work better than a pastel or bold shade.
Avoid using transparent animated gifs
Now I know I just told you to use transparent PNGs for your images, and I stand by that. But there is one exception: Try to not use transparent animated GIFs. They almost always have artifacts at the edges that make them not 100% transparent, so the better bet is to use a solid color background and just chill about the color mismatch between the background colors in dark mode.
Do not make everything images
The last point I’ll make is a big one for many many reasons from deliverability to accessibility. DO NOT MAKE EVERYTHING IMAGES. There’s so many things wrong with all image emails, the least of which is…

Doing this to your subscriber. When they have dark mode turned on, they have made a conscious choice to see content in a darker form. Making everything an image goes against the express wishes of the subscriber. You’re basically saying that your brand color is more important than their preferences. That’s definitely not the message I want to send to my subscribers. I want to make it as easy as possible for a subscriber to convert, even if it does mean an extra 10 minutes putting in dark mode styles.
How and where can I change dark mode?
The best idea is always to design with dark mode in mind. However, there are a few, and I mean FEW, hacks that can be used to change dark mode.

Email Clients That Respect the Dark Mode Media Query
We already know that Apple Mail, iOS Mail, Outlook for Mac, and Outlook iOS support the dark mode media query, so we can do some major progressive enhancement in these guys.
First is the image swap. This is most often used for logos. Like with any image swap, we start with two images — one that shows in light mode and one that shows in dark mode. We show the light mode image and hide the dark-mode logo by default. Then, we use the dark mode media query and display properties to hide the light mode image and show the dark-mode image when the email is opened in dark mode.

Since not every email client is going to respect the image swap, you still need to add the light-colored border around the image if it’s a dark logo. Otherwise, it will disappear into the background in all the email clients that don’t respect the dark-mode media query.
Another way we can optimize for dark mode is to put a filter on any bright jpegs you might be using. It’s as simple as using the dark mode media query to apply what ends up looking like a dark tint over your image only when the email is opened in dark mode.
@media (prefers-color-scheme: dark) {.foo {filter: brightness(.8) contrast(1.2);}}

Image from Campaign Monitor
Lastly, yes, you can force Apple Mail & iOS Mail to use light mode by not enabling dark mode, but don’t do that to your subscribers, man! You control how dark mode looks in those email clients, so you can make it look beautiful and easy on the viewer’s eyes. Forcing light mode is, yet again, putting your desires over the subscribers. That always has a negative impact on your ROI.
Force Text Colors – Gmail Dark Mode
Let’s move on to Gmail. In gmail, there are 2 hacks for dark mode.There is a way to keep white text white in dark mode in Gmail using blend modes.
It’s done via 3 divs surrounding the text you want to remain white in dark mode. It’s quite easy to implement. I will warn you, however, that this hack is very easy to mess up. For example, if you put anything other than text in those divs, even an image, it too will change colors thanks to the blend modes, so you need to be very deliberate when implementing this hack. Let me be your cautionary tale.
Force Background Colors – Gmail Dark Mode

Next, You can also force a background color in Gmail by using a single color in a linear gradient. This hack only maintains the same background color in light and dark mode. Any color on top of that gradient will be partially inverted, so use this hack sparingly.
<a href="#" style="background: #ACFF35; background: linear-gradient(#ACFF35, #ACFF35); text-decoration: none; padding: 10px 1px; color: #1a2837; border-radius: 100px; display:inline-block; font-weight: 700; font-size: 18px;">
DO NOT ABUSE THIS AND FORCE BACKGROUND COLORS ON EVERYTHING. You’ll just give yourself a headache. Take it from someone who’s done a LOT of testing.
Force Text Colors – Outlook Dark Mode
The last hacks are for desktop Outlooks, which fully invert your colors. You can keep white text white and black text black. Since desktop Outlook uses the Word rendering engine to display email, we’re able to apply text gradients in it. It’s probably the only good thing to come out of the Word rendering engine. These gradients get removed by the full-color invert of Outlook’s dark mode, but adding them back in is what gives us the power to retain original text colors!
<!--[if gte mso 16]><style>.keep-white {mso-style-textfill-type:gradient;mso-style-textfill-fill-gradientfill-stoplist:"0 \#FFFFFF 0 100000\,100000 \#FFFFFF 0 100000";color:#000000 !important;}.keep-black {mso-style-textfill-type:gradient;mso-style-textfill-fill-gradientfill-stoplist:"0 \#000000 1 100000\,99000 \#000000 1 100000";}</style><![endif]-->
The mechanics here are similar to the linear-gradient background color hack we looked at in Gmail. We’re creating a single color gradient that will be applied to our text in light mode. The gradient is stripped away in dark mode, and Outlook inverts your original text color just like normal. However, you have to be sure to put this class at the beginning of your classes, otherwise it will not work.
This hack is most often used for text on top of background images and it does wonders for that. I use it almost every time I code a background image.
https://webdesign.tutsplus.com/how-to-fix-outlook-dark-mode-problems–cms-37718
Useful links
Parcel’s Dark Mode Guide: https://parcel.io/guides/dark-mode
Litmus’ Ultimate Guide To Dark Mode: https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers
Campaign Monitor’s Dark Mode in Email Guide: https://www.campaignmonitor.com/resources/guides/dark-mode-in-email/
Email on Acid’s Dark Mode for Email Article: https://www.campaignmonitor.com/resources/guides/dark-mode-in-email/
Matthieu Salente’s Dark Mode Repo: https://github.com/matthieuSolente/email-darkmode
Rémi Parmentier’s Fixing Gmail’s Dark Mode Issues With CSS Blend Modes: https://www.hteumeuleu.com/2021/fixing-gmail-dark-mode-css-blend-modes/
Rémi Parmentier’s Dealing with Outlook.com’s Dark Mode: https://www.hteumeuleu.com/2019/dealing-with-outlook-com-s-dark-mode/
Rémi Parmentier’s Making Emails React to Outlook.com’s Dark Mode: https://www.hteumeuleu.com/2021/emails-react-outlook-com-dark-mode/
Nicole Merlin’s How To Fix Outlook Dark Mode Problems (Email Design): https://webdesign.tutsplus.com/how-to-fix-outlook-dark-mode-problems–cms-37718
Nicole Merlin’s How to Fix Common Problems With Buttons in Dark Mode (Email Design): https://webdesign.tutsplus.com/fixing-problems-with-buttons-in-dark-mode-email-design–cms-39411a
Nicole Merlin’s Fixing Problems With Borders in Dark Mode (Email Design): https://elements.envato.com/learn/fixing-problems-with-borders-in-dark-mode-email-design
Begin Your Journey to Better Emails
