Dark mode has moved from a nice extra to something many people expect. They turn it on in the evening, in a dim room, on a train, or simply because they prefer the calmer look. Done well, dark mode colours feel restful and focused. Done badly, they feel harsh, muddy, or hard to read, with glowing white text on pitch black backgrounds and bright colours that seem to vibrate on the screen.
The mistake most people make is treating dark mode as a simple inversion. Light mode reversed is not dark mode. White becomes black, black becomes white, and everything in between lands in an awkward place. Colours that looked fresh and friendly on a light background can look neon, washed out, or completely different on a dark one. A good dark palette is designed in its own right, with its own background levels, its own text shades, and its own treatment for brand colours and accents.
This guide walks through how to build dark mode palettes that stay comfortable for long sessions. You will learn why pure black is rarely the best background, how to layer surfaces without heavy shadows, how to soften text and accents, and how to keep your brand recognisable after dark. The principles apply to websites, apps, dashboards, and any screen-based product.
Why Pure Black Is Rarely the Right Background
Pure black, hex #000000, looks dramatic in a screenshot, but it is tiring to read on for more than a few minutes. The contrast between pure black and pure white text is the highest possible, and that extreme gap makes letters appear to glow or blur slightly, especially for people with astigmatism. Small text suffers most. Headlines survive the treatment, but body copy starts to shimmer.
A softer approach works better. Most comfortable dark interfaces use a very dark grey instead of true black, something in the family of #121212, #1A1A1A, or #1E1E1E for the main background. These shades still read clearly as dark, they still save the moody, focused feeling people want, but they reduce that harsh edge. Text in an off-white such as #E8E8E8 or #F2F2F2 on top of them feels calm rather than glaring.
There is one exception worth knowing. On OLED screens, true black pixels switch off completely, which can save battery and looks striking for image-led or entertainment interfaces. Even there, most designers keep text areas on a dark grey panel above the black, so reading stays comfortable while photos and video enjoy the deeper backdrop. Think of pure black as a special effect, not a default.
Building Layers Without Shadows
In light mode, depth is easy. A white card on a light grey page, helped by a soft shadow, clearly sits above the background. In dark mode, shadows almost disappear. A black shadow on a near-black background is invisible, so layering has to come from lightness itself. Each surface that sits higher gets a slightly lighter background than the one below it.
A simple three-level system covers most interfaces. Keep the page background darkest, around #121212. Lift cards and panels one step to around #1E1E1E or #242424. Lift menus, popovers, and dialogs one more step to around #2C2C2C or #333333. The steps should be small but consistent. If the jump is too large, the interface looks striped. If it is too small, layers blur together and users cannot tell what is interactive.
Borders still help in dark mode, but they should be quiet. A one-pixel line in a mid grey, or a white line at very low opacity, can separate a panel from the background without shouting. Combine gentle lightness steps with subtle borders and you get clear structure without a single shadow. This layered thinking also applies to websites that are not full apps. A dark footer, a slightly lighter pricing card, and a highlighted panel can all use the same ladder of greys.
Choosing Text Colours for Dark Backgrounds
Text is where dark mode succeeds or fails. Pure white text on a dark background is the most common cause of eye strain, so reserve pure white for very short, large headings if you use it at all. For body text, an off-white or light grey is kinder and still perfectly clear. Many comfortable palettes use something near #E0E0E0 for main text, a slightly dimmer grey near #B0B0B0 for secondary text, and a softer grey again for captions and hints.
That hierarchy matters more in the dark. In light mode, you can separate main text from secondary text with weight and size alone. In dark mode, brightness is your strongest hierarchy tool. Readers should be able to tell at a glance which line is the headline, which is the supporting detail, and which is a quiet label, just from how bright each one is. Keep at least three distinct text levels and test them at real sizes, not just in a style guide swatch.
Also watch line length and spacing. Slightly more line height and a touch more letter spacing can make light text on dark feel airier and easier to follow. If a paragraph looks dense or glowing in dark mode, the fix is often spacing and a slightly softer text colour, not a different font. And remember that readability rules do not relax after dark, so run through colour contrast basics for your text pairs just as you would in light mode.
Softening Brand Colours and Accents
Brand colours rarely survive the move to dark mode unchanged. A rich blue that looks trustworthy on white can look dull and heavy on a dark grey. A bright red can vibrate. A cheerful yellow can turn harsh and acidic. The usual fix is to create a dark-mode version of each brand colour that is lighter and slightly less saturated than the original. You are not changing the brand. You are translating it, the way the same sentence needs slightly different delivery in a quiet room.
Start with your main brand colour and lift its lightness step by step until it reads clearly on your background at small sizes, in buttons, links, and icons. Then check it next to your other colours, because lifting one colour changes its relationship with the rest. Greens, blues, and purples often need different amounts of adjustment, and oranges and reds need care so they do not start to glow.
Accent colours deserve special restraint. In dark mode, a little saturated colour goes a long way, because the dark surroundings make any bright patch feel brighter. Use accents in smaller areas than you would in light mode. A thin active indicator, a small icon, or a single button can carry the accent. A whole saturated panel that looked balanced on white can feel overwhelming on dark. If you are building both modes from one brand palette, the guidance in choosing brand colours will help you keep the family feeling consistent across the two versions.
Buttons, Links, and Interactive States
Interactive elements need extra attention after dark. A button that is obvious in light mode can fade into a dark background if it relies on a subtle shadow or a pale fill. Give primary buttons a solid fill with enough contrast against the page, and make sure the label on the button contrasts with the button itself. Both checks matter. A bright button with weak label contrast is just as unusable as a dim button that disappears.
Links are another trouble spot. Underlined links in a lifted, softened blue usually work well. Links identified by colour alone often fail, because several softened hues look similar on dark backgrounds. Keep the underline, or add another clear cue, especially in body text. Hover, focus, and pressed states also need to be visible without relying on shadows. A lightness step, an outline, or a slight colour shift works better than a darker shadow that nobody can see.
Do not forget disabled and error states. Disabled controls in dark mode often go too faint, leaving users unsure whether a button is disabled or simply styled in grey. Error reds need the softening treatment too. A slightly lighter, warmer red communicates the problem without the aggressive glow of a pure saturated red on black. Test every state in a real flow, not just the resting design, because state changes are where dark interfaces most often break down.
Images, Icons, and Illustrations After Dark
Images do not invert, and that creates friction. A bright product photo or a white-background illustration can blaze out of a calm dark page like a headlight. A few simple techniques help. Give images rounded corners and a subtle border so the edge between photo and background feels intentional. For diagrams and illustrations with white backgrounds, consider a dark-mode version with a transparent or dark background, or place the image on a light card deliberately, as a framed element, rather than letting it float awkwardly.
Icons need their own pass. Thin outlined icons that look elegant on white can become too faint on dark. Slightly thicker strokes, slightly brighter fills, or a small increase in size can restore their presence. Filled icons generally survive the switch better than hairline ones. Whatever style you choose, check icons at their smallest real size, in navigation bars and lists, because that is where weak icons vanish.
Charts and data displays need care as well. Gridlines should drop to a whisper, axis labels need the same off-white treatment as other secondary text, and data colours need the lifted, softened versions of your palette. A chart copied straight from light mode usually has white plotting areas and black lines hiding somewhere, so rebuild it properly rather than patching it.
Letting People Choose, and Respecting Their Setting
Most modern devices let people set a system-wide preference for light or dark appearance, and good websites respect that setting as the starting point. A visitor who has chosen dark mode everywhere should not land on a glaring white page, and a visitor who prefers light should not be forced into a moody dark design just because it looks fashionable. Detect the system preference, apply it, and then offer a clear toggle for anyone who wants to switch for your site alone.
Where you put the toggle matters. A small sun and moon control in the header, labelled clearly, is the pattern people recognise. Remember the choice on return visits, so nobody has to set it again every time. And test the toggle itself. Switching modes should change the whole page cleanly, including images, forms, and footers, with no leftover light panels stranded in a dark page.
Choice also means not using dark mode to hide problems. If your light design has weak contrast or clutter, a dark coat of paint will not fix it. Treat the two modes as siblings that share structure, spacing, and content, each with a palette tuned for its own conditions. Our roundup of website colour schemes shows how the same site structure can support quite different colour moods when each one is planned properly.
Common Dark Mode Mistakes to Avoid
- Using pure black and pure white together everywhere. The harshest possible pairing, saved for tiny moments, not whole pages of reading.
- Inverting and shipping. A mechanical inversion leaves brand colours muddy and accents garish. Always hand-tune the dark palette.
- Keeping saturated colour at light-mode sizes. Large bright areas glow on dark backgrounds. Shrink accent areas and soften saturation.
- Forgetting forms. Input fields, placeholders, and dropdowns are often left light by accident, producing glaring white boxes in a dark page.
- Grey text that goes too dim. Secondary text still needs to be read. Dim it gently, not into invisibility.
- Testing only at full brightness. People use dark mode at low screen brightness in dim rooms. Test there too, because faint greys disappear first.
One more mistake deserves its own mention: designing dark mode last, in a rush, from screenshots of the light design. Dark mode needs real screens, real content, and real scrolling. Long articles, busy dashboards, and checkout flows all reveal problems that a single hero section never will. Budget time for it the way you budget time for mobile layout, because for many visitors dark mode is not an edge case. It is the main experience.
A Simple Dark Palette to Start From
If you need a starting point, begin with a neutral ladder and one softened accent. Use a background near #121212, cards near #1E1E1E, and raised elements near #2A2A2A. Set main text near #E6E6E6, secondary text near #A8A8A8, and borders in a quiet mid grey. Then take your brand colour, lift it until it reads clearly for links and buttons, and use it sparingly. Add a softened green for success, a warm amber for warnings, and a lifted red for errors, each checked against the background.
From there, adjust by feel and by testing. View the palette at arm’s length, on a phone in a dim room, and on a laptop in daylight, because dark mode gets used in bright places too. Ask someone to read a long page and complete a form. Where they squint, slow down, or miss a control, adjust lightness first, because most dark mode problems are lightness problems wearing a colour costume. Before you finalise anything, work through testing your colour palette with both modes side by side, so small inconsistencies get caught while they are still cheap to fix.
Conclusion
Comfortable dark mode is not about making everything black. It is about care: a softened background instead of pure black, layers built from gentle steps of lightness, text in kind off-whites with a clear hierarchy, and brand colours translated to be lighter and calmer without losing their character. Give interactive states, images, and forms the same attention as the main page, respect the visitor’s own preference, and offer an easy way to switch. Do that, and your dark palette will feel like a place people can stay, reading and working comfortably long after the lights go down.
