{
  "id": 22944892,
  "title": "WCAG 2.2 AA & AAA Color Contrast Cheat Sheet for Devs",
  "url": "https://urgent.news/2026/12/01/wcag-2-2-aa-aaa-color-contrast-cheat-sheet-for-devs",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-01T11:16:47.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ajitvishwakarma/wcag-22-aa-aaa-color-contrast-cheat-sheet-for-devs-2bme"
  },
  "original_language": null,
  "account": "WCAG 2.2 Level AA and AAA color contrast guidelines are now legally required under the EU's European Accessibility Act (EAA), US ADA / Section 508, and enterprise SaaS procurement checklists. Failure to meet these contrast requirements can cause Lighthouse accessibility audits to fail and frustrate real users viewing content in bright daylight.\n\nThe WCAG 2.2 cheat sheet provides the exact contrast thresholds for various element types and font sizes. Normal body text (18pt or 14pt bold) must have a contrast ratio of 4.5:1 to 7.0:1, while large text (18pt or 14pt bold) needs a minimum of 3.0:1 to 4.5:1. Hero headlines, input borders, focus rings, and non-text UI components have different requirements.\n\nIt's important to note the conversion between points (pt) and pixels (px), as 1pt equals 1.333px. Therefore, 14pt bold should be a minimum of 18.67px to meet the Large Text threshold. Many developers make the mistake of using 14px bold instead, which still requires meeting the full 4.5:1 ratio.\n\nThe cheat sheet also offers pre-built accessible color pairs for both light and dark themes, ensuring that buttons, text, and other UI elements meet the contrast requirements. These color tokens have been battle-tested and verified to pass the 4.5:1 minimum for normal text and 3.0:1 for large text.\n\nIn addition to the main text contrast, it's crucial to test focus states and hover states, as these can sometimes fall below the minimum contrast ratio. Always verify that keyboard focus outlines meet the 3.0:1 requirement against adjacent backgrounds.\n\nThe WCAG contrast formula involves converting RGB values to relative luminance (L) and then calculating the ratio between the lighter and darker colors. However, for practical purposes, developers can use the provided color tokens and checkers to ensure compliance without needing to perform manual calculations.",
  "summary": "Nothing fails a Lighthouse accessibility audit—or frustrates real users squinting at their phone in daylight—faster than sleek, low-contrast grey text ( #9ca3af ) sitting on a white or translucent glassmorphic card. Beyond user experience, WCAG 2.2 Level AA contrast compliance is now a legal requirement across the EU European Accessibility Act (EAA) , US ADA / Section 508 , and enterprise SaaS…",
  "summary_source": "publisher",
  "key_points": [
    "WCAG 2.2 Level AA and AAA color contrast guidelines legally required",
    "Normal body text contrast ratio 4.5:1 to 7.0:1",
    "Hero headlines, input borders need 3.0:1 to 4.5:1 contrast"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}