Why Dark Mode Design Is Hard
Dark mode isn't just "invert the colors." If you take a light theme, flip white to black and black to white, you'll get something that looks off โ harsh, washed out, and hard to read. Good dark mode design is a whole different discipline.
The challenge comes from how human vision works. In bright environments, our eyes use photopic vision (cones). In dim environments, we switch to scotopic vision (rods). These two systems perceive color and contrast differently, and a palette that works in one mode won't necessarily work in the other.
Dark Mode Color Principles
1. Never use pure black (#000000)
Pure black backgrounds cause halation โ bright text literally bleeds into the dark background, making text appear fuzzy. Use a dark gray instead, like #0F172A or #121212 (Material Design's recommendation).
2. Never use pure white (#FFFFFF) for body text
Pure white on dark is too high contrast and causes eye strain over long sessions. Use an off-white like #E2E8F0 or #F1F5F9 for body text. Save pure white for headings and accents only.
3. Lower your saturation
Colors appear more saturated on dark backgrounds. A brand color that looks perfect in light mode might feel blinding in dark mode. Desaturate by 10-30% for dark mode variants.
4. Elevation = lighter, not darker
In light mode, elevation is shown with shadows (darker). In dark mode, it's the opposite โ elevated surfaces are lighter than the background. Cards should be lighter than the page background, not darker.
The Material Design Dark Theme Approach
Google's Material Design has one of the most well-researched dark mode systems. Here's how they structure it:
| Elevation | Color | Opacity Overlay | Use For |
|---|---|---|---|
| 0 (Background) | โ #121212 | 0% | Base page background |
| 1 (Card) | โ #1E1E1E | 5% white overlay | Cards, sheets, menus |
| 2 (Raised) | โ #222222 | 7% white overlay | Raised buttons, search bars |
| 3 (Modal) | โ #242424 | 8% white overlay | Dialogs, popovers |
| 4 (Top) | โ #272727 | 9% white overlay | Navigation, top bars |
The key insight: instead of having separate colors for each elevation level, you start with your base dark color and overlay white at different opacities. This creates a consistent, natural-feeling elevation system.
10 Ready-to-Use Dark Mode Color Palettes
1. Slate (Developer Favorite)
Background #0F172A ยท Surface #1E293B ยท Text #E2E8F0 ยท Primary #818CF8 ยท Accent #22D3EE
Our pick for developer tools, dashboards, and technical products. Inspired by Tailwind's slate palette. Easy on the eyes during all-night coding sessions.
2. Deep Purple (Creative Tools)
Background #1A0B2E ยท Surface #2D1B4E ยท Text #E9D5FF ยท Primary #A855F7 ยท Accent #F0ABFC
For creative tools, design apps, and entertainment products. Feels premium and imaginative.
3. Midnight Navy (Finance & SaaS)
Background #0C1929 ยท Surface #162A45 ยท Text #CBD5E1 ยท Primary #60A5FA ยท Accent #34D399
Professional and trustworthy. Perfect for fintech, analytics, and B2B dashboards.
4. Forest Green (Health & Wellness)
Background #0A1F1C ยท Surface #14332D ยท Text
#A7F3D0 ยท Primary #34D399 ยท Accent #FBBF24
Calm, natural, and grounded. Great for health, wellness, and eco-focused products.
5. Warm Charcoal (Content & Reading)
Background #1C1917 ยท Surface #292524 ยท Text #D6D3D1 ยท Primary #FB923C ยท Accent #FBBF24
Easy on the eyes for long-form reading. The warm tones reduce eye strain compared to cool grays.
6. Solarized Dark (Classic)
Background #002B36 ยท Surface #073642 ยท Text #93A1A1 ยท Primary #268BD2 ยท Accent #B58900
The classic. Developed by Ethan Schoonover with precise CIELAB lightness relationships. Still beloved by coders and writers.
7. Dracula (Developer Iconic)
Background #282A36 ยท Surface #44475A ยท Text #F8F8F2 ยท Primary #BD93F9 ยท Accent #FF79C6
Possibly the most popular dark theme in the world. Purple/pink palette that works across 300+ apps. Instantly recognizable.
8. Nord (Minimalist)
Background #2E3440 ยท Surface #3B4252 ยท Text #ECEFF4 ยท Primary #88C0D0 ยท Accent #8FBCBB
Arctic-inspired, cool blue-gray palette. Clean, minimal, and very calming. Popular in the developer community.
9. Rose (Warm & Feminine)
Background #1F1217 ยท Surface #301D24 ยท Text #FECDD3 ยท Primary #FB7185 ยท Accent #F472B6
Warm, inviting, and modern. Great for beauty, lifestyle, and creative community products.
10. Monochrome (Ultra-Minimal)
Background #18181B ยท Surface #27272A ยท Text #D4D4D8 ยท Primary #FAFAFA ยท Accent #A1A1AA
For content-first products where color should stay out of the way. All focus goes to imagery and text.
Dark Mode Typography Colors
Don't use the same text colors as light mode. Use a 3-4 level text hierarchy:
| Level | Color (Slate Dark) | Use For | Contrast |
|---|---|---|---|
| Primary Text | #F1F5F9 (slate-100) | Headings, important info | 15.8:1 (AAA) |
| Body Text | #CBD5E1 (slate-300) | Body copy, paragraphs | 10.6:1 (AAA) |
| Secondary | #94A3B8 (slate-400) | Captions, meta, labels | 6.0:1 (AA) |
| Disabled | #64748B (slate-500) | Disabled text, placeholders | 2.7:1 (below AA) |
Accessibility in Dark Mode
Dark mode doesn't automatically mean accessible. You still need to check:
- Contrast ratios: 4.5:1 minimum for body text. Our Contrast Checker works for both light and dark backgrounds.
- Halation: Light text on very dark backgrounds can appear to glow and blur. Slightly off-white text + slightly off-black background fixes this.
- Blue light: Highly saturated blue text or UI elements on dark backgrounds cause more eye strain. Desaturate blues or warm them up.
- Focus states: Dark mode focus rings are often too subtle. Make them thick and high-contrast.
Implementation Tips for CSS
Use CSS custom properties with a dark class or prefers-color-scheme media query:
:root {
--bg: #ffffff;
--surface: #f8fafc;
--text: #0f172a;
--primary: #6366f1;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f172a;
--surface: #1e293b;
--text: #e2e8f0;
--primary: #818cf8;
}
}
Start Designing
Ready to build your dark mode palette? Use our Palette Generator to find complementary colors, then generate tint/shade scales with our Shades Generator. Always test with the Contrast Checker before shipping.
Palette Generator โ Generate harmonious color schemes
Color Shades Generator โ Create tint and shade scales