HTML Email Guides

Dark Mode in HTML Emails

Design emails that remain legible when email clients change colors or apply dark appearance settings.

← All guides

Understand automatic color changes

Dark mode is not implemented consistently across email clients. Some preserve the original email colors, while others transform parts of the design automatically.

A dark background alone does not guarantee a successful dark mode experience. Text, links, logos and button colors must remain distinguishable.

Define foreground and background colors

Specify both text and background colors when they are important to contrast. Avoid relying on transparent backgrounds behind text that uses a fixed light or dark color.

Use sufficiently strong contrast for body content and primary actions. Important information should not depend on subtle decorative borders.

<td style="background-color:#ffffff;
  color:#172033;padding:24px;">
  <h2 style="color:#172033;">
    Account summary
  </h2>
</td>

Prepare logos for different backgrounds

A transparent dark logo may disappear against a dark background. Consider a logo with a suitable outline or a deliberately chosen background treatment.

Keep the brand name available as text or meaningful alternative text so that it remains identifiable even when the image fails to load.

Test appearance settings separately

Use MailViewer's preview background options to inspect the contrast around your email canvas. These controls do not simulate the automatic color transformations of individual email clients.

Send real test emails and switch the target applications between light and dark appearance settings. Review the message content, logo and action buttons in both modes.

Test your HTML email

Use MailViewer to preview, format and validate your HTML email directly in your browser.

Open MailViewer →

Continue learning

Technical references and resources →