> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/guides-and-best-practices/message/email/design-and-layout/how-to-optimize-your-email-designs-for-dark-mode.md).

# How to optimize your email designs for dark mode?

*Dark mode is widely used across email clients, but each inbox handles it differently. This can affect your email's colors, readability, and overall design. Here are our best practices to keep your emails readable and visually consistent in both light and dark modes.*

***

### How email clients apply dark mode

There is no single "dark version" of your email. Depending on the client, one of three things happens:

| Behavior           | What it does to your email                                                                                       |
| ------------------ | ---------------------------------------------------------------------------------------------------------------- |
| **No change**      | The inbox interface turns dark, but your email stays exactly as you designed it.                                 |
| **Partial invert** | Only light areas are darkened, and dark text on them is lightened. Areas that are already dark stay as they are. |
| **Full invert**    | Every color is inverted, light and dark alike. An email that was already dark can end up light.                  |

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FWphoaHe4ncn0BS2Ewzvx%2Fvisuel-1-comportements.png?alt=media&amp;token=f7769211-889f-496a-a270-e3b3f029ce9b" alt="Dark mode behaviours"><figcaption></figcaption></figure>

Here is how the main clients behave:

| Email client                              | Default behavior                                       | Can you apply your own dark styles? |
| ----------------------------------------- | ------------------------------------------------------ | ----------------------------------- |
| Apple Mail (iOS & macOS)                  | No change, unless your HTML declares dark mode support | ✅ Yes                               |
| Gmail (web)                               | No change                                              | ❌ No                                |
| Gmail app (Android)                       | Partial invert                                         | ❌ No                                |
| Gmail app (iOS)                           | Full invert                                            | ❌ No                                |
| Outlook.com & Outlook apps (iOS, Android) | Partial invert                                         | ⚠️ Partially                        |
| Outlook desktop (Windows)                 | Full invert                                            | ❌ No                                |
| Yahoo Mail, AOL                           | No change                                              | —                                   |

{% hint style="info" %}
Email client behavior **may vary** depending on the app version and email configuration. **Always test your final design** on the clients most relevant to your audience.
{% endhint %}

***

### Our best practices 👇

#### 1. Use transparent PNGs for your logo and icons

Images with a white background create a visible white box once the email turns dark. Export your logo, icons and cut-out visuals as **transparent PNGs** instead.

If your logo is dark (black or navy text), it may become invisible on a dark background. To keep it readable in every mode, add one of the following to the image file itself:

* a **light glow** or **thin white outline** around the dark parts: invisible on a white background, it makes the logo stand out on a dark one;
* a **light shape behind the logo** (rounded rectangle, circle) if you prefer keeping its original look.

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FKE2ziY2Oj4jrdeWasWFr%2Fvisuel-2-logo.png?alt=media&amp;token=b91e6662-ec64-4b7a-a737-03ff921f386a" alt="Logo behaviour in dark mode"><figcaption></figcaption></figure>

{% hint style="info" %}
💡 For photos that can't be transparent (product shots, banners), leave some padding around the subject and use a background color that works on both light and dark pages, so the image edge doesn't look like a hard cut.
{% endhint %}

#### 2. Choose colors with sufficient contrast

Some email clients may treat pure white and black differently from other shades. Using **softer** **alternatives**, such as `#FAFAFA` or `#1A1A1A`, can help reduce unexpected color changes, but doesn't guarantee consistent rendering.

Prioritize **sufficient contrast** between text and backgrounds (at least 4.5:1 for body text), and test your colors in both modes.

In Batch, adjust these colors under **Styles → Global Styles & Layout** and **Styles → Stripes Styles**.

#### 3. Keep your text readable

Unlike text embedded in images, live text stays sharp and can adapt to color changes applied by email clients. Keep your key messages, prices and CTAs as **live text**, and use images for visuals only.

For text links, consider using underlines so they remain identifiable even when colors change.

#### 4. Make your buttons stand out

Use solid button backgrounds with **sufficient contrast** between the text and background. A contrasting border can also help keep your **CTA** **visible** when colors are inverted.

In the Email Composer, set it once for all buttons in **Styles → Buttons** (border width and border color).

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FtRPfoMaCjYOrHi1HYfpJ%2Fvisuel-3-bouton.png?alt=media&amp;token=662d6dc2-a080-47b7-8e41-e4619137fd47" alt="Buttons behaviour in dark mode"><figcaption></figcaption></figure>

#### 5. Respect your reader's choice

Some HTML tricks force an email to stay in light mode. We don't recommend them: recipients who turned on dark mode often did it for comfort or accessibility reasons. Design an email that works in dark mode rather than fighting it.

***

### Test before sending

To check how your email renders in dark mode, use the Send test feature and open it on real devices with dark mode enabled.

👉 **Our recommendations:**

* Test at least on **Gmail app (iOS)**, **Gmail app (Android)**, **Apple Mail (iPhone)** and **Outlook**: together, they cover the three behaviors.
* Check in particular: is the **logo visible**? Are there **white boxes** around images? Are **buttons** still distinguishable? Is all **text readable**?

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FBNUnxUYv6fSoaUZ1xZVt%2Fvisuel-4-do-dont.png?alt=media&amp;token=e519fac5-0ece-48da-a2f8-3662d21d3492" alt="Do&#x27;s and don&#x27;ts in dark mode"><figcaption></figcaption></figure>

***

### For HTML templates: add your own dark theme

If you [upload your own HTML template](https://doc.batch.com/guides-and-best-practices/message/email/templates-and-modules-management/how-to-upload-your-email-templates), you can define dark mode colors yourself for the clients that support it (mainly Apple Mail, and partially Outlook apps). Other clients will ignore this code and apply their default behavior, so the best practices above still apply.

<details>

<summary>See the code</summary>

**1. Declare dark mode support** in the `<head>` of your template:

```html
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
```

**2. Add your dark styles** in a `<style>` tag, using classes you add to your HTML elements:

```html
<style>
  :root {
    color-scheme: light dark;
    supported-color-schemes: light dark;
  }

  @media (prefers-color-scheme: dark) {
    .email-body { background-color: #1A1A1A !important; }
    .email-text { color: #F2F2F2 !important; }
    .email-link { color: #8AB4F8 !important; }

    /* Swap logos: hide the light version, show the dark one */
    .logo-light { display: none !important; }
    .logo-dark  { display: block !important; max-height: none !important; }
  }
</style>
```

**3. Add both logo versions** in your HTML. The dark one is hidden by default:

```html
<img class="logo-light" src="https://example.com/logo-dark-text.png" alt="Brand" width="160">
<!--[if !mso]><!-->
<img class="logo-dark" src="https://example.com/logo-white-text.png" alt="Brand" width="160"
     style="display:none; max-height:0; overflow:hidden;">
<!--<![endif]-->
```

{% hint style="info" %}
Outlook apps (iOS, Android) and Outlook.com don't read `@media (prefers-color-scheme: dark)`. To target them, duplicate your dark rules with the `[data-ogsc]` prefix (for text colors) and `[data-ogsb]` prefix (for background colors), for example: `[data-ogsc] .email-text { color: #F2F2F2 !important; }`.
{% endhint %}

</details>

***

### Before sending: your dark mode checklist ✅&#x20;

* [ ] My logo and images **remain visible without unwanted white backgrounds**.
* [ ] My text and links are **readable**.
* [ ] My buttons are **clearly** **distinguishable**.
* [ ] My email has been **tested** in dark mode across **different** email clients.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.batch.com/guides-and-best-practices/message/email/design-and-layout/how-to-optimize-your-email-designs-for-dark-mode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
