CliprMeta
CliprMeta / Blog / Web and interface / Dark Mode App Palette: Hex Codes and Contrast Tips

Dark Mode App Palette: Hex Codes and Contrast Tips

· 2 min read · By Aymane, icon and logo designer

Quick answer

Designing for dark mode involves using very dark grays instead of pure black for backgrounds, and desaturating vibrant accent colors. Prioritize readability by ensuring sufficient contrast for text and adapting brand colors appropriately.

Dark mode has become a widely adopted standard for digital interfaces, driven by user preferences for visual comfort and battery efficiency. However, simply inverting colors from a light theme can lead to eye strain and poor readability. A well-designed dark mode palette requires a strategic approach to color selection, contrast, and elevation.

Foundational Colors for Dark Mode

The primary canvas color in dark mode should not be pure black (#000000). Pure black can cause a 'halation' effect, making text appear to glow and blur, which increases eye strain. Instead, opt for very dark grays.

Material Design recommends #121212 as a foundational surface color for dark themes. This choice allows for better expression of depth, elevation, and a wider range of other colors. Using a slightly lighter dark gray for elevated surfaces helps to communicate hierarchy without relying on shadows, which are less effective on dark backgrounds.

Accent Colors and Brand Adaptation

Vibrant accent colors used in light themes can be too intense against dark backgrounds, potentially causing visual vibration and discomfort. To maintain visual harmony and reduce eye strain, desaturate highly saturated hues by 10-20% when adapting them for dark mode.

Similarly, when integrating brand colors into a dark theme, it is often necessary to adjust them. Reduce their saturation by 10-20% and increase their lightness by 10-20%. This ensures that brand colors remain premium-looking and maintain adequate contrast against the dark canvas.

Ensuring Readability and Contrast

Accessibility guidelines are crucial for dark mode. For body text, a minimum contrast ratio of 4.5:1 against its background is recommended (WCAG AA standard). Large headings should achieve at least a 3:1 contrast ratio. While high contrast is important, excessively high contrast can also be fatiguing.

Material Design suggests that main text in dark mode should have approximately 87% opacity over the background. This slightly reduces the contrast to a comfortable level while preserving readability. This approach helps to prevent the text from appearing too stark or glowing too intensely against the dark background.

Images and Icons in Dark Mode

Images and icons also need consideration for dark mode. Elements designed for light backgrounds might appear too bright or

  • Slightly reduce the brightness of images to prevent them from standing out excessively.
  • Provide alternative versions of logos and SVG icons if their original design causes them to glow or disappear against a dark background. This ensures brand consistency and visual appeal in both light and dark themes.

Dark Mode App Essentials: the palette

Calm, Modern, Accessible

Dark Canvas Background
A very dark gray for the main background to prevent eye strain and allow for depth, as recommended by Material Design.
Elevated Surface Surface
A slightly lighter dark gray to indicate elevated UI elements and communicate hierarchy without shadows.
Primary Text Text
A light gray for main body text, offering good readability with a comfortable contrast ratio against the dark background (7.43:1 on #121212).
Accent Blue Accent
A desaturated light blue for interactive elements, providing a clear visual cue without being overly vibrant (6.85:1 on #121212).
Secondary Text Text
A mid-tone gray for secondary information or disabled states, ensuring adequate contrast while being less prominent than primary text (4.57:1 on #121212).
Pin it

Frequently asked questions

Why shouldn't I use pure black for my dark mode background?

Pure black (#000000) can cause eye strain and a 'halation' effect where text appears to glow and blur. Very dark grays, like #121212, are better for visual comfort and allow for more depth.

How do I make sure text is readable in dark mode?

Ensure body text has at least a 4.5:1 contrast ratio against its background, and large headings reach 3:1. Using a slightly desaturated light color for text can also help reduce eye strain.

Should I adjust my brand colors for dark mode?

Yes, it's recommended to desaturate brand colors by 10-20% and increase their lightness by 10-20% to ensure they appear premium and maintain good contrast against dark backgrounds.

Related color guides

Sources

This post was drafted with AI using current web sources, which are linked above. Hex codes and color advice are guidance, so always test colors and contrast in your own design.

More from the blog