Skip to content
FastTool

WCAG contrast rules for large text, icons, borders and translucent overlays

Every WCAG 2.2 contrast rule depends on CSS pixel size, font weight, element role, and whether translucent colors let backgrounds bleed through.

Updated · Uses the free Color Contrast Checker, which runs in your browser

Short answer

Normal text needs at least 4.5:1 contrast for WCAG 2.2 AA and 7:1 for AAA. Large text starts at 24 px regular (18 pt) or 18.67 px bold (14 pt, or 19 px whole). Large text needs 3:1 for AA and 4.5:1 for AAA. Active input borders, custom focus outlines and standalone icons also need 3:1, and semi-transparent rgba() colors must be composited first.

Open the Color Contrast Checker

Why 18 pt and 14 pt bold equal 24 px and 18.67 px in CSS

WCAG 2.2 writes its large-text rule in typographic points: 18 pt at normal weight, or 14 pt when bold. Many teams misread 18 pt as 18 px and ship body headings that miss AA.

W3C CSS Values and Units fixes 1 inch at 96 CSS pixels and 1 point at 1/72 inch. Dividing 96 by 72 gives 1 pt = 1.3333 px (exactly 4/3 px). Multiplying by 4/3 converts both WCAG cutoffs into exact CSS sizes:

WCAG 2.2 contrast ratios mapped to CSS pixel sizes and UI parts
Element type CSS size and weight AA minimum AAA minimum
Normal text (SC 1.4.3, 1.4.6) Below 24 px regular, or below 18.67 px bold 4.5:1 7.0:1
Large text, regular 24 px or larger (18 pt × 4/3) 3.0:1 4.5:1
Large text, bold 18.67 px or larger at font-weight: 700 (19 px whole) 3.0:1 4.5:1
Borders, focus rings & icons (SC 1.4.11) Active inputs, custom focus outlines, standalone icons 3.0:1 3.0:1 (no separate AAA)
Exempt elements Disabled controls, decorative lines, brand logos None None

At whole-pixel sizes, 18 px bold equals 13.5 pt, so it still needs 4.5:1 for AA. Step up to 19 px at font-weight: 700 (14.25 pt) before applying the 3:1 large-text threshold.

Worked example: why a muted slate link passes on white and fails on a card

Open the Color Contrast Checker and click Try an example, or open this slate link pair directly:

  1. Colors: foreground #64748b (relative luminance 0.1706) over card background #f1f5f9 (relative luminance 0.9085).
  2. Contrast formula: (0.9085 + 0.05) / (0.1706 + 0.05) = 4.3439, displayed as 4.34:1.
  3. What passes and fails: 4.34:1 passes 3:1 for a 24 px heading or 19 px bold button, yet misses 4.5:1 for 16 px links.
  4. Nearest passing shade: darkening OKLCH lightness gives #627188 at 4.52:1 for AA, or #45546a at 7.02:1 for AAA.

On pure white #ffffff, that same #64748b foreground reaches 4.76:1 and passes AA. Always test text against the darkest light-theme card or lightest dark-theme panel it sits on.

How WCAG 2.2 SC 1.4.11 (3:1) applies to borders, focus outlines and icons

Success Criterion 1.4.11 requires at least 3:1 contrast for visual parts people need to recognize or operate a control:

  • Form input borders: when a white text box sits on a white card, its border shows where to click. A light border such as #94a3b8 on #ffffff gives only 2.56:1 (open this 2.56:1 border pair). Darkening to #8896ab reaches 3.00:1 while keeping the cool gray hue.
  • Custom focus outlines and state markers: focus rings, checked boxes, active switch tracks and slider thumbs need 3:1 against adjacent colors.
  • Standalone icons: a close, menu or search button with no visible text label needs 3:1 between the icon and button fill. When visible text next to an icon already passes 4.5:1, the icon becomes supplementary.
  • Exemptions: inactive or disabled controls, purely decorative card dividers, unmodified browser-default widgets, and company logos have no WCAG contrast minimum.

Why semi-transparent rgba() overlays pass on dark heroes and fail on light ones

Browsers blend semi-transparent foregrounds over the backdrop in sRGB using Porter-Duff source-over compositing: C_out = α · C_fg + (1 − α) · C_bg. Because C_bg enters every channel, one rgba() rule gives completely different ratios as the backdrop changes.

Test a 55% white caption rgba(255, 255, 255, 0.55) across three backdrop shades from a hero photo:

Contrast of rgba(255, 255, 255, 0.55) across three backdrop shades
Backdrop color Composited hex Contrast ratio WCAG 2.2 outcome
Deep navy #0f172a #93979f 6.07:1 Passes AA normal and large text (open 6.07:1 pair).
Mid slate #334155 #a3aab3 4.40:1 Passes 3:1 large text, misses 4.5:1 body copy (open 4.40:1 pair).
Bright sky #cbd5e1 #e8ecf2 1.25:1 Fails both 3:1 and 4.5:1 (open 1.25:1 pair).

Over #334155, raising opacity from 55% to 57% reaches 4.60:1, or switching to solid #a5acb5 reaches 4.52:1. Over a photograph with bright patches, place an opaque or dark scrim behind the caption and check the brightest pixel underneath.

Common mistakes

  • Rounding 4.496:1 up to 4.50:1. Pass and fail depend on the unrounded ratio; 4.496:1 falls below 4.5 and must be darkened slightly.
  • Using the old 0.03928 sRGB constant. WCAG 2.1 errata and WCAG 2.2 use the IEC 61966-2-1 threshold 0.04045 when linearizing sRGB channels.
  • Checking rest state while ignoring hover or dark theme. Hover fills, tinted banners and dark cards often lower contrast below the rest-state pair.

Sources

Spotted a mistake in this guide? Email contact@fasttool.app. We reply within 7 business days.

Open the Color Contrast Checker