Contents

Home › Articles

Designing for Dark Mode: Best Practices and Pitfalls

By Maya Thompson · Published · Updated · 4 minutes read

Smartphone and laptop screens displaying dark mode user interface designs
Smartphone and laptop screens displaying dark mode user interface designs · Foto: ClickerHappy / Pixabay

Dark mode has become a standard feature in modern interfaces, offering reduced eye strain in low-light environments and potential battery savings on OLED screens. But simply inverting colors rarely works. Designing a dark theme requires careful consideration of color theory, contrast, and visual hierarchy.

This article covers practical best practices and common pitfalls when creating dark mode designs. You'll find guidance on choosing background colors, ensuring accessibility, and testing your theme for real-world use.

Why Dark Mode Matters

Dark mode is no longer a niche preference. Major operating systems and apps offer it, and users expect it. Beyond aesthetics, dark mode can reduce power consumption on OLED displays by up to 60% at typical brightness levels, according to display industry estimates. It also provides comfort in low-light settings, making it easier on the eyes during nighttime use.

However, dark mode is not universally better. For users with astigmatism or certain visual impairments, light text on dark backgrounds can cause halation—a blurring effect that reduces readability. Offering both themes and letting users choose is the safest approach. The key is to implement dark mode thoughtfully, not just as an afterthought.

  • Reduces eye strain in low-light environments
  • Can save battery on OLED screens
  • Meets user expectations for modern apps
  • Should be optional, not forced
1000Light Mode400Dark Mode300Dark Mode (AMOLED)950Dark Mode (LCD)
Power Consumption by Theme on OLED Displays (milliwatts)

Avoid Pure Black and Pure White

One of the most common mistakes is using pure black (#000000) as the background and pure white (#FFFFFF) for text. This combination creates excessive contrast, which can cause eye fatigue and make text appear to vibrate. Instead, use dark grays such as #121212 or #1E1E1E for backgrounds. These shades are easier on the eyes and still provide sufficient contrast.

Similarly, avoid pure white for text. Use off-white or light gray, like #E0E0E0 or #CCCCCC. This reduces the harshness while maintaining readability. Material Design recommends using a dark surface with white text at 87% opacity for high-emphasis text, and lower opacities for secondary text. This approach creates a more comfortable reading experience.

  • Use #121212 or #1E1E1E for backgrounds
  • Use off-white (#E0E0E0) for text
  • Adjust text opacity for hierarchy

Maintain Sufficient Contrast

Accessibility guidelines require a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. In dark mode, achieving this can be tricky because light text on dark backgrounds can appear bolder due to the way our eyes perceive luminance. Test your color combinations with a contrast checker to ensure compliance.

Pay attention to interactive elements like buttons and links. They should stand out against the dark background. Use accent colors that are bright enough but not neon. For example, a muted blue like #BB86FC (a common dark theme accent) provides good contrast without being overwhelming. Also, consider the contrast of disabled states—they should be visibly distinct but not too faint.

  • Aim for 4.5:1 contrast for body text
  • Use 3:1 for large text and UI components
  • Test with contrast ratio tools
  • Choose accent colors that pop but don't glare

Choose Colors That Work in Both Themes

If your design supports both light and dark modes, your color palette must be flexible. Avoid colors that rely on a white background to be legible. For instance, dark blue text on a light background may become invisible on a dark background. Instead, define colors using design tokens or CSS variables that can be swapped per theme.

Saturation also matters. Highly saturated colors can appear neon on dark backgrounds, causing glare. Desaturate your colors slightly for dark mode—reduce saturation by about 10-20% and increase lightness to maintain visibility. This ensures that brand colors remain recognizable without being harsh.

  • Use design tokens for theme-able colors
  • Desaturate colors for dark backgrounds
  • Test brand colors in both modes

Pay Attention to Elevation and Depth

In light mode, shadows create depth. In dark mode, shadows are less effective because they blend into the dark background. Instead, use lighter surfaces to indicate elevation. Material Design uses overlays of white at varying opacities to create elevation levels: the higher the elevation, the lighter the surface.

For example, a card at rest might have a surface of #1E1E1E, while a modal dialog could be #2C2C2C. This subtle difference helps users perceive hierarchy. Avoid using borders as the primary means of separation; they can create visual clutter. Combine elevation with spacing and typography to guide the eye.

  • Use lighter surfaces for higher elevation
  • Avoid heavy borders
  • Combine with spacing for clarity
Recommended Color Values for Dark Mode Elements
ElementLight ModeDark ModeNotes
Background#FFFFFF#121212Avoid pure black
Primary Text#000000#E0E0E0Off-white reduces glare
Secondary Text#666666#A0A0A0Lower opacity for hierarchy
Primary Button#007BFF#BB86FCDesaturated accent
Surface (Card)#F8F9FA#1E1E1ESlightly lighter than background
Error#DC3545#CF6679Desaturated red for dark mode

Test in Real Conditions

Always test your dark mode design in the environments where it will be used. View it on different screens—from low-quality monitors to high-end OLED displays—and in various lighting conditions, from a dark room to bright daylight. What looks good on your calibrated monitor may be unreadable on a phone at night.

Also, test with actual content. Placeholder text like 'Lorem ipsum' may not reveal contrast issues that real text does. Check images and illustrations: they may need alternate versions for dark mode. For instance, dark icons on transparent backgrounds can disappear. Provide assets with appropriate contrast or use CSS filters to adapt them.

  • Test on multiple devices and lighting conditions
  • Use real content, not placeholders
  • Adapt images and illustrations for dark mode

Common Pitfalls to Avoid

Even experienced designers fall into traps when creating dark themes. One pitfall is using pure black for text on a light background in light mode, which can cause similar glare issues. Another is neglecting to adjust the brightness of images and videos—they can be too bright and disrupt the dark experience.

Also, be cautious with drop shadows. In dark mode, shadows should be darker than the background, but since the background is already dark, they may become invisible. Use subtle glows or borders instead. Finally, don't forget about form fields and input areas—they need clear boundaries and sufficient contrast to be usable.

  • Avoid pure black text in light mode
  • Dim images and videos in dark mode
  • Rethink shadows; use borders or glows
  • Ensure form fields are clearly defined
  • Use dark gray backgrounds, not pure black, to reduce eye strain.
  • Ensure sufficient contrast (4.5:1 for text) and test with accessibility tools.
  • Adapt colors, images, and elevation for dark mode—don't just invert.
  • Always test in real-world conditions and with actual content.
Maya Thompson · Senior Design Editor
Maya has spent over a decade writing about visual design and brand strategy. She focuses on practical advice for freelancers and small teams, helping them navigate pricing, client work, and creative workflows. Her articles emphasize clear steps and real-world examples.

Related

September 20, 2026

Pantone vs CMYK vs RGB: A Practical Comparison for Designers

Compares the three color systems side by side so designers know when to use each for different projects.

April 19, 2026

How to Choose a Logo Color Palette That Works Across Print and Screen

Explains how to select a logo color palette that stays consistent in both print and digital formats, with practical steps and checks.

October 31, 2025

How to Use Grid Systems in Layout Design: A Primer

Introduces grid systems for layout design and explains how to apply them to create balanced, organized compositions.

↑