Dark Mode Design: Doing It Without Breaking Your Brand
Learn how to add dark mode to your website or app without damaging your brand, with colour tokens, WCAG contrast rules, imagery fixes and a testing checklist.
Key Takeaways
- Dark mode is a second colour scheme designed on purpose, not a light theme flipped to dark.
- Near-black surfaces around #121212 with off-white text keep long reading comfortable.
- Brand colours stay recognisable when the hue is kept and saturation is reduced for dark surfaces.
- Every text pair needs 4.5:1 contrast, and every screen needs testing in both themes.
Dark mode design works when a website or app offers a dark theme that keeps the brand recognisable, the text readable and every control usable. A dark mode design guide is the plan that makes that happen: it defines a second set of colours for the same interface instead of simply inverting the light theme. This guide explains how to build that second set, from colour tokens and contrast checks to images, toggles and testing, so the dark theme feels like the same product in a different light. It applies to business websites, web apps and mobile apps, and follows current guidance from Google Material Design and Apple Human Interface Guidelines plus the contrast rules in WCAG 2.2. You will learn how to adapt brand colours, set text contrast, handle logos and photos, build a theme toggle, and test every screen before launch.
What Is Dark Mode Design?
Dark mode design is the practice of creating a dark colour scheme for a website or app, using dark surfaces with light text as an alternative to the standard light theme. Layout, type scale and spacing stay the same, so users meet the same product in a different light. Only the palette changes: backgrounds turn dark, text turns light, and every accent, border and status colour gets a dark variant.
Google Material Design recommends a dark surface around #121212 rather than pure black. A near-black surface keeps shadows visible, stops bright text from glaring, and gives elevated cards a lighter tone to sit on. Apple Human Interface Guidelines agree: every custom colour needs a light variant and a dark variant. The operating system can then offer the right theme automatically through the prefers-color-scheme setting.
Dark mode is now an expectation rather than a feature, so a poor dark theme is visible on every screen.
How to Apply This Dark Mode Design Guide Step by Step
A dark mode design guide works best as a short sequence of decisions, each made once and reused everywhere.
- Audit the light theme and list every colour role: background, surface, text, border, link, accent, status colours and focus.
- Set the dark surfaces first, starting near #121212, with lighter steps for cards, menus and dialogs.
- Choose text colours that pass contrast on the lightest surface.
- Adapt the brand accent by lightening it and reducing saturation while keeping the hue.
- Give every status colour a dark variant.
- Prepare dark variants for logos, illustrations, charts and screenshots.
- Build the toggle so it respects the system setting by default and remembers a manual choice.
- Test every component and every state in both themes before launch.
Naming colours by role instead of appearance is what makes this sequence hold together. A token called surface means the same thing in both themes, while a token called white breaks the moment the theme changes. When every component reads from tokens, one change updates the whole product.
Why a Dark Mode Design Guide Starts With Colour Tokens
Colour tokens protect the brand because they separate what a colour means from what it looks like. The brand blue keeps its hue in both themes, but its lightness and saturation change: a vibrant blue that looks confident on white can look like it is emitting light on near-black, and two saturated colours side by side can shimmer. The fix is to move the accent lighter so it clears contrast, reduce saturation by roughly 15 to 25 percent, and keep the hue intact.
The same treatment applies to every semantic colour. A success green that passes contrast on white can fail on a dark surface, and an error red tuned for light backgrounds can turn muddy or aggressive in the dark. Each status colour needs its own dark variant, checked against the real surfaces it will sit on. Our UI and UX design services build token systems like this for websites and apps, so a new theme or a new screen never means starting from scratch.
How Do You Keep Text Readable in Dark Mode?
Text readability in dark mode follows the same rules as in light mode, because WCAG 2.2 sets no separate, looser rule for dark themes. Success Criterion 1.4.3 requires at least 4.5:1 for normal text and 3:1 for large text, and Success Criterion 1.4.11 requires 3:1 for interface components, including form borders, icons and focus indicators. A dark theme that meets those numbers is readable.
In the February 2026 WebAIM Million report, low-contrast text was found on 83.9% of the one million home pages tested, up from 79.1% the year before, and it has been the single most common accessibility failure for years. Dark themes contribute to that total whenever a designer picks a soft grey for secondary text and never measures it, so give secondary text a real number and check it against the lightest surface it can land on.
| Content type | Minimum contrast (WCAG AA) |
|---|---|
| Body text | 4.5:1 |
| Large text | 3:1 |
| UI components and focus indicators | 3:1 |
| Decorative elements | No requirement |
Two details make the numbers work in practice. First, avoid pure white text on pure black, which reaches the maximum possible contrast of 21:1 and still hurts to read, because bright text on a dark background can glow and blur for readers with astigmatism. An off-white around #E0E0E0 to #ECECEC is calmer and still passes. Second, raise the font weight slightly: a 400 weight in light mode often needs 500 in dark mode. A full web accessibility checklist for 2026 covers the contrast checks alongside the other WCAG requirements a site should meet.
What Happens to Images, Logos and Charts in Dark Mode?
Images do not change colour when the theme changes, which is exactly why they need attention. A photograph usually survives, but an illustration drawn on white suddenly sits inside a white box on a dark page. A logo drawn in dark navy on transparent ground can vanish against a near-black header, and a chart with thin grey lines can fade until its data is unreadable.
The practical approach is to prepare a dark variant for every brand asset that depends on its background. Logos need a light version for dark surfaces, and the HTML picture element can swap images based on the theme. Illustrations should be redrawn on transparent ground or given a dark version of their own. Charts need their series colours, grid lines and labels rechecked against dark surfaces.
Shadows deserve the same review. In a light theme, a shadow shows that a card sits above the page, but on a dark background a black shadow is invisible, so depth has to come from lighter surfaces instead. Google Material Design documents this directly, recommending dark grey rather than black so elevation stays visible.
How Should the Theme Toggle Work?
A theme toggle should respect the system setting first and the visitor second. The browser exposes the operating system choice through the prefers-color-scheme media query, so a site can match the theme a visitor already chose on their phone or computer. A manual toggle offers an override, remembered for the next visit.
Apple and Google disagree on one detail worth knowing. Apple Human Interface Guidelines advise against offering an in-app appearance setting, preferring the system choice alone, while Android and Material Design recommend offering Light, Dark and System options. For a website, the practical middle ground is a visible toggle with those three choices in the header or settings menu, with an accessible name and keyboard support.
Two technical details prevent the most common complaints. First, the saved theme must be applied before the first paint, or visitors see a flash of the wrong theme on every load. A small script in the document head that reads the saved choice solves this. Second, the color-scheme property should declare support for light and dark schemes, so the browser aligns scrollbars and form controls with the theme.
What Are the Common Mistakes in Dark Mode Design?
Most dark mode failures come from the same short list. Inverting the light theme is the first: a one-line inversion flips images, shadows and brand colours in ways nobody designed, and the result passes a screenshot review while failing in use. Pure black backgrounds with pure white text are the second, producing glare instead of comfort. Soft grey secondary text that never gets measured is the third.
The remaining mistakes are about states and screens. A toggle that works on the home page but leaves forms, error messages and empty states in light colours is unfinished. Focus indicators that vanish on dark surfaces leave keyboard users lost. A theme tested only on the hero screen hides problems in dialogs, tables and tooltips. Before any rebuild, our website redesign checklist for 2026 covers the checks that belong first, and the same discipline applies to adding a dark theme.
The pattern behind all of these mistakes is treating dark mode as a toggle instead of a theme. A theme is a second design, with its own palette, imagery and testing. Teams that plan it as a theme ship it once and keep it.
How Do You Test Dark Mode Before Launch?
Testing dark mode means checking every component in every state, in both themes, with human eyes. List every component, including buttons, form inputs, navigation menus, modals, tooltips, data tables, charts, focus rings and alerts, and check each one in its default, hover, focus, selected, invalid, disabled and loading states. A component that passes by default can still fail when disabled or showing an error.
Measure contrast on the rendered page, not in the design file, because text over photos, gradients and translucent panels has a changing background a token calculation cannot prove readable. Tab through both themes with a keyboard and confirm the focus indicator stays visible. Test the forced colours mode some operating systems offer, since it overrides the theme and exposes controls that depend on colour alone.
Finish with real devices in real light. A theme that looks calm on an office monitor can glare on a phone at full brightness. Check it at low brightness in a dark room and at full brightness outdoors, on the phones visitors actually use. When every screen passes in both themes, the dark mode is ready to ship.
Frequently Asked Questions
Does dark mode need to meet the same contrast rules as light mode?
Yes. Dark mode must meet the same WCAG 2.2 contrast rules as light mode, with at least 4.5:1 for normal text and 3:1 for large text and interface components. There is no separate, looser rule for dark themes. A dark theme that passes those ratios is readable, while one that relies on appearance alone often fails for low-vision readers.
Should a website use pure black for its dark mode background?
No. Pure black with pure white text creates glare and after-images, and it makes shadows invisible, so depth disappears from the design. Google Material Design recommends a dark surface around #121212 instead, with off-white text near #E0E0E0. A near-black surface keeps elevation visible and long reading comfortable for most visitors.
How do brand colours change in dark mode?
Brand colours keep the same hue in dark mode but become lighter and less saturated, so they stay recognisable without glowing against a dark surface. A common adjustment is to raise lightness and reduce saturation by roughly 15 to 25 percent. Every status colour, including success, warning and error, needs the same treatment and a contrast check.
Should dark mode follow the system setting or offer a manual toggle?
Dark mode should follow the system setting by default, using the prefers-color-scheme media query, and also offer a visible manual toggle with Light, Dark and System choices. The manual choice should be remembered for the next visit. Apple advises against an in-app setting, while Android recommends the three options, so a toggle with a System choice satisfies both positions.
Do images and logos need changes for dark mode?
Yes. Logos need a light version for dark surfaces, illustrations drawn on white need a transparent or dark variant, and charts need their series colours and grid lines rechecked against dark backgrounds. Photographs usually survive unchanged. The HTML picture element can swap the right image variant automatically when the theme changes.
A dark theme done well makes a product feel considered at every hour of the day, and a dark theme done badly is visible on every screen. Skills Technology Solutions, a software agency based in Rahim Yar Khan, Pakistan, serving clients in Pakistan and the UK, can help you put this into practice. Contact our team to discuss your project.
Related Articles
Keep reading — more guides you may find useful.
Related Services
Services connected to this guide.
