{"id":234,"date":"2026-09-30T17:16:35","date_gmt":"2026-09-30T17:16:35","guid":{"rendered":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/"},"modified":"2026-09-30T18:21:16","modified_gmt":"2026-09-30T18:21:16","slug":"color-contrast-check-before-publishing","status":"publish","type":"post","link":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/","title":{"rendered":"Text Contrast in Web Design: WCAG Ratios and Practical Checks"},"content":{"rendered":"<p class=\"bo-doc-status\">Documentation-based practice example; check the controls in your installed Oxygen version.<\/p>\n<nav class=\"bo-doc-toc\" aria-label=\"On this page\">\n<p><strong>On this page<\/strong><\/p>\n<ul>\n<li><a href=\"#overview\">What the checker measures<\/a><\/li>\n<li><a href=\"#example\">Worked example: verify the reading colors<\/a><\/li>\n<li><a href=\"#thresholds\">Use the correct text threshold<\/a><\/li>\n<li><a href=\"#states\">Check the real background and states<\/a><\/li>\n<li><a href=\"#troubleshooting\">Troubleshooting<\/a><\/li>\n<li><a href=\"#references\">Reference and next checks<\/a><\/li>\n<\/ul>\n<\/nav>\n<section id=\"overview\">\n<h2>What the checker measures<\/h2>\n<p>The <a href=\"https:\/\/benjaminolsen.dev\/index.php\/contrast-checker\/\">Color Contrast Checker<\/a> compares the relative luminance of two solid, opaque sRGB colors. It calculates <code>(lighter luminance + 0.05) \/ (darker luminance + 0.05)<\/code>. A ratio measures the color pair; it does not assess every accessibility requirement.<\/p>\n<\/section>\n<section id=\"example\">\n<h2>Worked example: verify the reading colors<\/h2>\n<ol>\n<li>Enter <code>#f7f7f3<\/code> as text and <code>#111415<\/code> as background.<\/li>\n<li>The tested checker reports approximately <strong>17.232:1<\/strong>, passing the displayed normal\/large AA and AAA text thresholds.<\/li>\n<li>Compare a boundary case: black and white returns 21:1, while white on white returns 1:1 and fails those thresholds.<\/li>\n<li>Test your secondary text color too; checking only the main heading misses other reading content.<\/li>\n<\/ol>\n<\/section>\n<section id=\"thresholds\">\n<h2>Use the correct text threshold<\/h2>\n<div class=\"bo-doc-table-wrap\">\n<table>\n<caption>WCAG text contrast thresholds<\/caption>\n<thead>\n<tr>\n<th>Text category<\/th>\n<th>AA<\/th>\n<th>AAA<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Normal text<\/td>\n<td>4.5:1<\/td>\n<td>7:1<\/td>\n<\/tr>\n<tr>\n<td>Large text<\/td>\n<td>3:1<\/td>\n<td>4.5:1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Large text is at least 18pt, approximately 24 CSS pixels, or 14pt bold, approximately 18.67 CSS pixels. Use the actual text styling to select the threshold. The checker makes pass\/fail decisions from the full ratio rather than its rounded display.<\/p>\n<\/section>\n<section id=\"states\">\n<h2>Check the real background and states<\/h2>\n<p>Compare the computed foreground with the background directly behind the text. Repeat for hover, disabled and focus states where relevant. For text on images, gradients or translucent layers, this two-color tool is not sufficient; inspect the composited result and the worst background area behind the text.<\/p>\n<p>Placeholders and small helper text can be difficult to read even when a large heading passes. Keep visible labels so an input\u2019s meaning does not disappear after typing.<\/p>\n<\/section>\n<section id=\"troubleshooting\">\n<h2>Troubleshooting<\/h2>\n<ul>\n<li><strong>Invalid input:<\/strong> use a three- or six-digit hex color such as <code>#fff<\/code> or <code>#111415<\/code>. This tool does not accept CSS color names or alpha values.<\/li>\n<li><strong>A displayed value seems to pass but the result fails:<\/strong> the decision uses the unrounded ratio; do not round a near-threshold value up.<\/li>\n<li><strong>The screenshot still looks hard to read:<\/strong> inspect font size, weight, line length and the real background, not only the ratio.<\/li>\n<li><strong>You changed one color:<\/strong> repeat the check for adjacent text and interaction states affected by the change.<\/li>\n<\/ul>\n<\/section>\n<section id=\"references\">\n<h2>Reference and next checks<\/h2>\n<p>Reference: <a href=\"https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/contrast-minimum.html\">W3C understanding text contrast<\/a>. Continue with keyboard operation, focus visibility, meaningful labels and text resizing. A successful color check is one verified part of the page, not a claim of complete accessibility.<\/p>\n<\/section>\n<section id=\"related\">\n<h2>Related guides and tools<\/h2>\n<ul>\n<li><a href=\"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/oxygen-text-element\/\">Oxygen 6 Text Element: A heading system with correct document structure<\/a><\/li>\n<li><a href=\"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/oxygen-text-link\/\">Oxygen 6 Text Link: A useful next-step link below a tutorial<\/a><\/li>\n<li><a href=\"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/better-spacing-in-oxygen\/\">Oxygen Spacing System: Reusable Variables and a Card Example<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/benjaminolsen.dev\/index.php\/tools\/\">Explore all tools<\/a> \u00b7 <a href=\"https:\/\/benjaminolsen.dev\/index.php\/guides\/\">Browse the documentation library<\/a><\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_oxygen_hide_in_design_set":false,"_oxygen_tags":"","footnotes":""},"categories":[8,6],"tags":[],"bo_topic":[19],"bo_resource_type":[21],"bo_doc_section":[],"class_list":["post-234","post","type-post","status-publish","format-standard","hentry","category-css","category-tips","bo_topic-css-web-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen<\/title>\n<meta name=\"description\" content=\"Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/\" \/>\n<meta property=\"og:locale\" content=\"da_DK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen\" \/>\n<meta property=\"og:description\" content=\"Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/\" \/>\n<meta property=\"og:site_name\" content=\"Benjamin Olsen\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-30T17:16:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-30T18:21:16+00:00\" \/>\n<meta name=\"author\" content=\"Benjamin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Benjamin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/\"},\"author\":{\"name\":\"Benjamin\",\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#\\\/schema\\\/person\\\/aee4e89bcb6704d860babf7ba16a0b8d\"},\"headline\":\"Text Contrast in Web Design: WCAG Ratios and Practical Checks\",\"datePublished\":\"2026-09-30T17:16:35+00:00\",\"dateModified\":\"2026-09-30T18:21:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/\"},\"wordCount\":442,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#\\\/schema\\\/person\\\/aee4e89bcb6704d860babf7ba16a0b8d\"},\"articleSection\":[\"CSS\",\"Tips\"],\"inLanguage\":\"da-DK\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/\",\"url\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/\",\"name\":\"Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#website\"},\"datePublished\":\"2026-09-30T17:16:35+00:00\",\"dateModified\":\"2026-09-30T18:21:16+00:00\",\"description\":\"Check text contrast with real color examples. Understand AA\\\/AAA thresholds, test foreground\\\/background pairs and avoid misleading pass\\\/fail results.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/#breadcrumb\"},\"inLanguage\":\"da-DK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/2026\\\/09\\\/30\\\/color-contrast-check-before-publishing\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/benjaminolsen.dev\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text Contrast in Web Design: WCAG Ratios and Practical Checks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#website\",\"url\":\"https:\\\/\\\/benjaminolsen.dev\\\/\",\"name\":\"Benjamin Olsen\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#\\\/schema\\\/person\\\/aee4e89bcb6704d860babf7ba16a0b8d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/benjaminolsen.dev\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"da-DK\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/benjaminolsen.dev\\\/#\\\/schema\\\/person\\\/aee4e89bcb6704d860babf7ba16a0b8d\",\"name\":\"Benjamin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"da-DK\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g\",\"caption\":\"Benjamin\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g\"},\"sameAs\":[\"http:\\\/\\\/benjaminolsen.dev\"],\"url\":\"https:\\\/\\\/benjaminolsen.dev\\\/index.php\\\/author\\\/benjamin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen","description":"Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/","og_locale":"da_DK","og_type":"article","og_title":"Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen","og_description":"Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.","og_url":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/","og_site_name":"Benjamin Olsen","article_published_time":"2026-09-30T17:16:35+00:00","article_modified_time":"2026-09-30T18:21:16+00:00","author":"Benjamin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Benjamin","Est. reading time":"2 minutter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/#article","isPartOf":{"@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/"},"author":{"name":"Benjamin","@id":"https:\/\/benjaminolsen.dev\/#\/schema\/person\/aee4e89bcb6704d860babf7ba16a0b8d"},"headline":"Text Contrast in Web Design: WCAG Ratios and Practical Checks","datePublished":"2026-09-30T17:16:35+00:00","dateModified":"2026-09-30T18:21:16+00:00","mainEntityOfPage":{"@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/"},"wordCount":442,"commentCount":1,"publisher":{"@id":"https:\/\/benjaminolsen.dev\/#\/schema\/person\/aee4e89bcb6704d860babf7ba16a0b8d"},"articleSection":["CSS","Tips"],"inLanguage":"da-DK","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/","url":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/","name":"Text Contrast in Web Design: WCAG Ratios and Practical Checks | Benjamin Olsen","isPartOf":{"@id":"https:\/\/benjaminolsen.dev\/#website"},"datePublished":"2026-09-30T17:16:35+00:00","dateModified":"2026-09-30T18:21:16+00:00","description":"Check text contrast with real color examples. Understand AA\/AAA thresholds, test foreground\/background pairs and avoid misleading pass\/fail results.","breadcrumb":{"@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/#breadcrumb"},"inLanguage":"da-DK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/benjaminolsen.dev\/index.php\/2026\/09\/30\/color-contrast-check-before-publishing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/benjaminolsen.dev\/"},{"@type":"ListItem","position":2,"name":"Text Contrast in Web Design: WCAG Ratios and Practical Checks"}]},{"@type":"WebSite","@id":"https:\/\/benjaminolsen.dev\/#website","url":"https:\/\/benjaminolsen.dev\/","name":"Benjamin Olsen","description":"","publisher":{"@id":"https:\/\/benjaminolsen.dev\/#\/schema\/person\/aee4e89bcb6704d860babf7ba16a0b8d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/benjaminolsen.dev\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"da-DK"},{"@type":["Person","Organization"],"@id":"https:\/\/benjaminolsen.dev\/#\/schema\/person\/aee4e89bcb6704d860babf7ba16a0b8d","name":"Benjamin","image":{"@type":"ImageObject","inLanguage":"da-DK","@id":"https:\/\/secure.gravatar.com\/avatar\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g","caption":"Benjamin"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/fda08b9a3a73cd1a57fc39c2a767fb6441b2dbf176857221a8da88161187eeb1?s=96&d=mm&r=g"},"sameAs":["http:\/\/benjaminolsen.dev"],"url":"https:\/\/benjaminolsen.dev\/index.php\/author\/benjamin\/"}]}},"_links":{"self":[{"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/posts\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":2,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":588,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/posts\/234\/revisions\/588"}],"wp:attachment":[{"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/tags?post=234"},{"taxonomy":"bo_topic","embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/bo_topic?post=234"},{"taxonomy":"bo_resource_type","embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/bo_resource_type?post=234"},{"taxonomy":"bo_doc_section","embeddable":true,"href":"https:\/\/benjaminolsen.dev\/index.php\/wp-json\/wp\/v2\/bo_doc_section?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}