Agent Wranglers

Layout and accessibility Recommended

Plan for dark mode

Design for clients that switch to dark mode, so text stays readable and logos stay visible.

How to do it

Declare support with <meta name="color-scheme" content="light dark"> and <meta name="supported-color-schemes" content="light dark">. Add prefers-color-scheme styles where clients support them, such as Apple Mail. Other clients invert colours on their own. Avoid pure black on pure white, and give dark logos a light outline that works on both.

Example

<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<style>
  @media (prefers-color-scheme: dark) {
    .body { background:#14172e !important; color:#f5f7ff !important; }
  }
</style>

How to check

Send a test to Apple Mail, Gmail and Outlook with dark mode on. All text stays readable, and logos and icons stay visible.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers email playbook: https://agentwranglers.se/playbook/email/layout-and-accessibility/email-dark-mode.