The examples in this article use a Chrome extension that is no longer supported. You can use this contrast analyzer from TPGi as an alternative.
Images can enhance interfaces, but, when serving as background for text, they can reduce its legibility. Small adjustments to the images can keep designs accessible and attractive.
Image Contrast Is Essential
A well-chosen visual adds interest and sets the tone of a website, in addition to (hopefully) conveying some meaning. Eyetracking research shows that people are attracted to information-carrying photos related to the user’s current task (and are likely to ignore decorative images).
Images can also prompt a positive visceral emotional response and spur viewers into taking action. As a result, many designers create highly visual interfaces that downplay text and contain large background images or videos.
However, placing text on top of an image backfires when the contrast between the text and the background is too low. According to accessibility requirements for color contrast, text that is not purely decorative or part of a logo should have a contrast ratio of at least 4.5:1 (or 3:1 for large characters, defined as an 18-point font or a 14-point bold font).
Subtle Tweaks Make a Big Difference
Placing text over an image can’t be avoided, but special care must be taken to ensure that the text is both legible and readable to users. (As a reminder, legibility refers to the ability to distinguish the individual characters, while readability refers to the ability to actually process the meaning of the words.)
When text is difficult to decipher, readers are forced to choose between straining their eyes and skipping over the content. Rather than risk that users ignore your text, implement small changes to the design to increase the contrast between the text and the background.
Subtle Tweaks Make a Big Difference in Usability
Placing text over an image need not be completely avoided, but special care must be taken to ensure that the text is both legible and readable to users. (As a reminder, legibility refers to the ability to distinguish the individual characters, while readability refers to the ability to actually process the meaning of the words.) When text is difficult to decipher, readers are forced to choose between straining their eyes and skipping over the content. Rather than risk that users ignore your text, implement small changes to the design to increase the contrast between the text and the background.
Consider Color
When placing text over an image, consider both the text color and the main color of the image. Light-colored or faded backgrounds are not well-suited to white text because the colors are too similar. In these situations, the background will need to be darkened to provide enough contrast.
This can be done either by processing the image or by adding a semi-transparent black gradient over the image in the CSS. A tool such as the Color Contrast Analyzer by TPGi can help determine when the background has been sufficiently darkened to provide adequate contrast for the overlaying text.
Adding a blur effect to photos offers an alternative to darkening every image. While it will alter some aesthetics and branding, blurring a portion of a photo minimizes legibility issues by making the text background appear more consistent. You can also avoid affecting the image too much by positioning text near the edge of the image. The lower portion of photos tends to lend itself well to added effects such as a blur, a darkening-gradient overlay (AKA “floor fade”), or a semitransparent colored background for that area of text.
Consider all possible images that may be used before deciding on a technique for handling text-overlay contrast. Often, a solution may work for one image but not for others. If both dark and light images are included in a design, ensure that the chosen method will provide a high enough contrast for the worst-case background image and text placement.
Conclusion
There is no need to choose between creating a usable design and an aesthetically pleasing design — both can be achieved simultaneously if attention is put toward both goals. When combining emotion-provoking imagery with informational text, ensure that the text is readable by creating a high-contrast ratio between the text and its background. Use effects such as a semiopaque overlay (either covering the entire image or just the text portion), a blur, a text shadow or outline, or a combination of these techniques. Remember that it’s not enough to make it possible for people to use the site, which is the definition of accessibility. The site must also be easy and pleasant — qualities which require good usability and little eyestrain.