Dark mode has become a ubiquitous feature in modern digital interfaces, celebrated for its aesthetic appeal, potential for reduced eye strain in low-light environments, and battery savings on OLED screens. However, designing for dark mode presents unique challenges, one of the most significant being text halation. This optical illusion can make light text on a dark background appear blurry, washed out, or even vibrate, significantly impacting readability and user experience.
Halation, often described as 'light bleeding,' occurs when the high contrast between bright text and a dark background causes the light to diffuse into the surrounding dark areas. This phenomenon is exacerbated by how our eyes perceive light, particularly the way pupils dilate in dim conditions, increasing the surface area of the retina exposed to light and making light sources appear larger. For designers, understanding and actively mitigating text halation is crucial for creating truly accessible and comfortable dark mode experiences.
Understanding the Root Cause: Why Halation Happens
At its core, text halation is an optical effect that makes bright objects on a dark canvas seem larger than they truly are. When your eyes encounter light text on a dark background, the light from the text can 'bleed' into the surrounding dark pixels. This isn't just a digital artifact; it's a physiological response. In low-light conditions, our pupils dilate to let in more light, which unfortunately also increases spherical aberration, making light sources appear less focused and more diffused. This makes sharp, thin lines of text on a dark background particularly susceptible to appearing fuzzy or glowing.
For designers, this means that simply inverting your light mode color palette often isn't enough. A pure white text on a pure black background, while achieving maximum contrast, is often the worst offender for halation. It creates an uncomfortable visual tension, where the text seems to 'vibrate' or glow, making it harder for the eyes to settle and read comfortably over extended periods. Our goal, therefore, is not just high contrast, but *comfortable* contrast.
Strategic Color Selection: Beyond Pure White and Black
The most impactful step in mitigating halation is a careful approach to color. Avoid using pure white (#FFFFFF) text on a pure black (#000000) background. This high-frequency contrast is a primary driver of halation. Instead, opt for desaturated colors for both text and background.
- **Desaturate your whites:** Use off-white or light gray tones for your primary text. For instance, instead of #FFFFFF, try #E8E8E8, #F0F0F0, or a very light shade of your brand's accent color. This slight desaturation reduces the intensity of the light emitted by the text.
- **Lighten your blacks:** Your dark background shouldn't be pure black. Use a deep charcoal, dark gray, or a very dark shade of a primary brand color. Examples include #121212, #1A1A1A, or #202020. This reduces the extreme contrast delta, providing a softer backdrop.
- **Maintain sufficient contrast:** While desaturating, ensure your text still meets accessibility guidelines for contrast ratios (e.g., WCAG 2.1 AA level for normal text requires 4.5:1, large text 3:1). Tools like WebAIM Contrast Checker can help validate your choices.
- **Embrace subtle color:** For secondary text or UI elements, introduce slightly more saturated, but still muted, colors. This can add visual interest without contributing to halation.
Typography Choices: Fonts, Weights, and Spacing
The characteristics of your chosen typeface play a significant role. Some fonts are inherently better suited for dark mode than others. Thin font weights, while elegant in light mode, can almost disappear or appear overly fuzzy in dark mode due to halation. Opt for slightly bolder or medium weights for optimal legibility. Fonts with generous x-heights and open counters also tend to perform better.
Beyond the typeface itself, consider these adjustments to typography:
- **Choose appropriate weights:** Avoid ultra-light or thin font weights. Regular, medium, or semi-bold weights are generally safer bets. They provide enough stroke width to prevent the text from looking flimsy or dissolving into the dark background.
- **Increase letter spacing (tracking):** A slight increase in letter spacing can help separate characters and reduce the perception of them bleeding into each other. Experiment with small increments (e.g., 0.02em to 0.05em) to find what works best without making the text appear too airy.
- **Adjust line height (leading):** Adequate line height prevents lines of text from merging, allowing the eye to track more easily. A slightly larger line height than what you'd use in light mode can be beneficial, typically between 1.4x and 1.6x the font size for body text.
Layout and Visual Hierarchy Considerations
While color and typography are primary factors, how you arrange elements on the screen can also influence perceived halation. A cluttered interface with too many bright elements can overwhelm the user's vision.
Think about providing sufficient breathing room around text blocks and interactive elements. Ample negative space helps the eye focus on the content without distraction from surrounding light sources. Additionally, ensure your visual hierarchy is clear. Use variations in font size, weight, and color (within your desaturated palette) to guide the user's eye and highlight important information without resorting to overly bright or high-contrast elements that could trigger halation.
Testing in Real-World Conditions
The most critical step in mitigating text halation is rigorous testing. What looks good on your perfectly calibrated design monitor might look entirely different on a user's phone in a dimly lit room or on an older display. Test your dark mode designs on a variety of devices, including different screen types (LCD, OLED) and resolutions. Pay close attention to how text appears in varying light conditions, from bright daylight to complete darkness.
Gather feedback from a diverse group of users. Ask them about their comfort levels, perceived readability, and any visual fatigue. Iterate based on their observations. Remember that accessibility is paramount, and ensuring text is comfortably legible for all users, including those with visual impairments, is the ultimate goal. By actively addressing halation, you elevate your dark mode experience from merely functional to genuinely delightful and accessible.
Sources & Further Reading
- @media/prefers-color-scheme — MDN Web Docs
- Dark Mode: The Good, The Bad, and The Ugly — Interaction Design Foundation
- Dark mode — Wikipedia
- Supporting dark mode with CSS and meta tags — web.dev







