Dark Mode Website Colour Palettes
A good dark mode is not an inverted light mode. Pure black backgrounds with pure white text create harsh contrast and can cause a smearing effect on some screens when scrolling. Most well-designed dark themes use a very dark grey or tinted near-black for the base, with off-white text, which is much easier to read for long periods.
Depth in dark mode comes from lightness rather than shadows. Instead of drop shadows, raised elements such as cards, menus and modals sit on slightly lighter surfaces than the background. A scale of three or four dark greys, each a step lighter than the last, gives you that layering.
Saturated brand colours often glow uncomfortably on dark backgrounds. You will usually need lighter, slightly desaturated versions of your primary and status colours for dark mode. Check every pairing for contrast again, since a colour that passes on white may fail on charcoal.
Website Dark Mode palettes
Neutral Dark Theme
Page background in the darkest grey, cards in the next step, menus and modals in the lightest surface, secondary text in the mid grey, body text in the off-white and links in the soft blue.
Blue-Black Docs
Background in the blue-black, sidebar in the navy, code blocks in the slate, text in the pale blue-grey, links in the periwinkle and warnings in the amber.
Forest Night Theme
Page in the green-black, cards in the dark moss, inputs in the lighter moss, text in the pale grey-green and buttons and highlights in the soft mint.
Tips
- Use a near-black such as 121417 for the page and step up to lighter greys for cards and menus.
- Set body text to an off-white around 85 to 90 per cent lightness rather than pure white.
- Lighten and slightly desaturate accent colours so they do not vibrate against dark surfaces.
- Tint your neutrals a little towards your brand hue, such as a blue-black or green-black, for a more distinctive feel.