How to Measure Text: Contrast

Introduction

What is Contrast Ratio?

Two black rectangles compare text contrast ratios. The left shows light gray text reading "10:1," while the right shows dark gray text reading "3:1," illustrating a stark difference in readability due to contrast levels.
Against the black background, light grey text is easier to read compared to darker grey text.

Target Contrast Ratios for Accessible Text

infographic showcasing 5 rows of different color contrast ratios, in various shades of blue, using the word "Accessibility" in a bold serif font. contrast lowers from 21:1 to 1.5:1 decreasing legibility in each row. Details are in the following list.

High Contrast Design Tip

SpongeBob SquarePants: The Patrick Star HUD during a boatmobile race. The Hud features amount of laps completed, placing, a timer, side objectives and hints. The palette is primarily white text with a dark purple outline with a lighter purple backing the text.
SpongeBob SquarePants: The Patrick Star Game HUD during a boatmobile race: text features thick, high-contrast outlines across all elements (Controls, Racing Interface, Subtitles, Feats, Hints, and Currency) Outlined text is further supported by both opaque and semi-opaque backing.

Measuring Contrast Using CCA (Colour Contrast Analyser)

Color Selection Tip

Elden Ring's HUD item slots with a flask labeled “Flask of Cerulean Tears.” CCA's color picker is hovered over the L. On the right, CCA displays contrast results for light gray text against a light brown background, with a contrast ratio of 2.9:1. All WCAG 2.1 accessibility checks fail.
Elden Ring HUD zoomed into Item Slots in the lower left corner. CCA’s color picker highlights a pixel in the center of the anti-aliased “l” within “Cerulean Tears.” This text also demonstrates how background gameplay influences the contrast of text without outlines or opacity. The right side of the text shows low contrast where it overlaps with the brightness of the Site of Grace.

Colorblindness Simulation

Color Contrast analyzer displaying a red and black pairing in 4.5:1 contrast. In the simulation window, black is unchanged but the red appears as 8 different hues as follows: achromatopsia is grey, achromatomaly is grey-maroon, protanopia is olive, deuteranopia is olive-tan, tritanopia is a similar red, protanomaly is brown, deuteranomaly is  an orange-brown and tritanomaly is a similar red.
Colour Contrast Analyser Colorblindness Simulation showcasing how red and black appear in Monochromacy, Dichromacy, and Trichromacy types of color vision deficiency.

Conclusion