Dark Mode Pair Generator
Paste a light-mode HEX palette and get the matching dark-mode colors via OKLCH lightness inversion. WCAG contrast checks and CSS variables export.
What is the Dark Mode Pair Generator?
A perceptually accurate tool that converts any light-mode color palette into its dark-mode counterpart. Rather than naively flipping HEX values, it works in OKLCH — the perceptually uniform color space that powers modern CSS — inverting only the lightness component while preserving hue. This keeps brand colors recognizable in dark mode while still giving them the muted, calmer appearance users expect from a dark theme. Each pair is checked against WCAG contrast guidelines so you can ship accessible UIs.
Key Features
- OKLCH-based lightness inversion preserves hue and brand identity
- Per-color WCAG contrast ratio against #FFFFFF and #121212 backgrounds (AA / AAA badges)
- Adjustable desaturation, lightness floor and ceiling for fine control
- Side-by-side light and dark preview swatches
- Exports as drop-in CSS variables for :root, [data-bs-theme="dark"] and prefers-color-scheme
- Accepts 3- and 6-digit HEX in any whitespace-, comma- or newline-separated format
- 100% browser-side — your palette never leaves your device

How to Use
- Paste your light-mode HEX colors into the palette box (one per line works best)
- Optionally adjust desaturation if dark colors look too saturated
- Tune the lightness floor to keep dark backgrounds from going pure black
- Tune the lightness ceiling to keep light text from going pure white (reduces eye strain)
- Click Generate Dark Pair to see swatches, WCAG contrast scores and the CSS variables export
- Copy the CSS block and drop it into your stylesheet — your dark theme is ready
