Dark Mode Color Palette Generator

Moody, readable dark-UI palettes ready to use

Ad placeholder (leaderboard)

This generator builds complete dark-mode palettes with each color assigned a UI role — background, surfaces, accent, and text — and verifies the text-on- background contrast against WCAG so your dark theme is actually readable.

How it works

A single base hue is chosen, then five role colors are derived in HSL:

  • Background: the base hue at very low lightness (about 8–12%) with low saturation — a near-black that is not pure black.
  • Surface 1 and 2: the same hue a few lightness steps higher, giving two elevation layers for cards and modals.
  • Accent: a vivid color at higher saturation and mid lightness for buttons and links.
  • Text: a near-white at very high lightness.

The text and background are then run through the WCAG contrast formula:

ratio = (Llighter + 0.05) / (Ldarker + 0.05)

where L is relative luminance. AA requires 4.5, AAA requires 7.

Tips and notes

Use the two surface colors for elevation rather than relying only on shadows. The accent should be reserved for interactive elements so it stands out against the muted background. If the reported ratio dips below 4.5, regenerate — the text lightness will land higher and pass. Click any swatch to copy its hex.

Ad placeholder (rectangle)