Dark Mode Palette Generator
Turn one brand colour into a full dark mode colour palette — background, surfaces, text, borders and accents — with a matching light theme and the contrast checked. Copy it as CSS variables or Tailwind.
Colours (click one to copy its hex code)
Contrast
How to make a dark mode color palette
Enter your brand colour as a hex code, or choose it with the picker. The generator builds every colour a dark interface needs: a background, two surface levels for cards and menus, a border, text and muted text, a primary colour with its hover state and the text that goes on it, and success, warning and danger colours. Switch the preview between Dark and Light to see the matching light theme, then copy the code.
Dark color CSS: why not pure black
Good dark themes rarely use #000000 with white text. A very dark grey background with slightly off-white text is easier to read for long periods, and it leaves room for surfaces to get lighter as they rise: in dark mode, depth is shown with lighter surfaces, not shadows. Neutral gives plain dark greys. Tinted mixes a little of your brand hue into the greys so the theme feels like yours. True black uses #000000 for the page, which saves power on OLED screens.
Brand colours need adjusting for dark mode
A brand colour chosen for a white page is usually too dark, or too intense, on a dark one. The generator keeps the hue and makes the colour lighter until links and buttons reach the contrast target on the dark surface. It does the opposite for the light theme. The work is done in OKLCH, where lightness matches what the eye sees, so the hue does not drift as the colour gets lighter.
Contrast is checked for you
The contrast table shows the measured WCAG ratio for each text and background pair. Standard aims for at least 4.5:1, the AA level for normal text. High aims for 7:1, the AAA level. To test your own pairs, or text on a gradient, use the Contrast Checker.
CSS variables and Tailwind
CSS variables gives you a light theme in :root and the dark theme inside @media (prefers-color-scheme: dark), so the page follows the visitor’s system setting. CSS with a toggle puts the dark theme under [data-theme="dark"] and .dark for sites with their own switch. The Tailwind v4 output maps the variables to utilities such as bg-surface and text-primary; a Tailwind v3 config, SCSS and JSON are there too.
Need more colours? Build a full palette in the Color Palette Generator, pull one from a photo with Color Palette from Image, or browse colour names A–Z.
