Skip to content

WCAG contrast checker

Choose text and background colors to see their contrast ratio and whether the pair meets WCAG AA or AAA for your text size.

Enter HEX, rgb(), hsl(), oklch() or a color name. Semitransparent text is composited over the background before calculating contrast.

Contrast ratio -
Compare with WCAG 2.2 criteria
ElementAAAAA
Normal text1.4.3 / 1.4.6
Large textAt least 18 pt (24 px), or 14 pt (about 18.7 px) in bold
UI components and graphics1.4.11 (button borders, icons and charts)No criterion

Preview

Button Input border

From top to bottom: 24 px, bold 19 px, 16 px and 12 px text. The border and icon use the text color.

Closest colors meeting the criteria

Find the nearest qualifying color by changing only HSL lightness (L). Hue and saturation stay the same. Select “Use” to apply a color.

Color vision simulator

Approximation using the matrices from Machado et al. (2009), with dichromacy at severity 1.0. Individual color perception varies.

Design & color

No data