NHRepon
Home
Services
All ServicesWeb Application DevelopmentMobile Application DevelopmentDigital Marketing and SEO
ProjectsToolsProductsPostsAboutContactLogin
HomeServicesProjectsToolsProductsPostsAboutContact
  • Home
  • Projects
  • Posts
Home/Tools/Design & Color Tools/Contrast Checker
All Tools

Contrast Checker

Check the WCAG 2.2 contrast ratio between any two colours and see instantly whether your text passes AA, AAA or the 3:1 non-text requirement.

10.31:1
contrast ratio

Large heading sample

Normal body copy at 16 px. This is the size the AA 4.5:1 rule applies to.

WCAG 2.2 conformance for this colour pair
RequirementNeedsThis pairApplies to
AA — normal text4.5:1PassBody copy under 24 px, or under 18.66 px bold
AA — large text3:1Pass24 px and above, or 18.66 px and above bold
AAA — normal text7:1PassEnhanced level for critical or long-form text
AAA — large text4.5:1PassEnhanced level, large text only
Non-text / UI components3:1PassButtons, borders, icons and focus rings (WCAG 1.4.11)

What is a Contrast Checker?

A contrast checker measures the difference in luminance between a foreground and a background colour and returns a ratio between 1:1 (the two colours are identical) and 21:1 (pure black on pure white). WCAG 2.2 turns that number into a conformance test: 4.5:1 for normal text at level AA, 3:1 for large text and for non-text interface elements, and 7:1 for normal text at level AAA.

The calculation follows the WCAG definition exactly. Each sRGB channel is divided by 255 and linearised — c / 12.92 below 0.03928, otherwise ((c + 0.055) / 1.055)²·⁴ — then weighted 0.2126 red, 0.7152 green and 0.0722 blue to give relative luminance. The ratio is (L₁ + 0.05) / (L₂ + 0.05) with the lighter colour first. Green carries most of the perceived brightness and blue almost none, which is why a blue-on-black pair can look legible on screen and still fail.

"Large text" has a precise definition: 24 px and above, or 18.66 px and above when bold. That is roughly 18 pt and 14 pt — the sizes at which thinner strokes stop being a legibility problem, which is why the threshold drops to 3:1.

How to check the contrast between two colours

  1. Enter the foreground and background colours, either as hex values (#374151, or the three-digit #fff shorthand) or with the colour pickers.
  2. Read the ratio, shown to two decimal places. Above 4.5:1 is the practical target for body copy.
  3. Read the conformance table, which marks each WCAG requirement as pass or fail against this specific pair rather than in the abstract.
  4. Look at the live preview. It renders a heading and body copy in your exact pairing, which is the fastest way to catch a pair that technically passes but still reads badly.
  5. Use Swap colours when it is unclear which of the two is the darker one, and the presets to compare against a known-good grey, dark-mode pair or your brand colour.

Contrast Checker limits and rules

Limits, caps and standards referenced by this tool
ItemLimit
AA, normal text4.5:1 minimum
AA, large text3:1 minimum — 24 px+, or 18.66 px+ bold
AAA, normal text7:1 minimum
AAA, large text4.5:1 minimum
Non-text and UI components3:1 against adjacent colours (WCAG 1.4.11)
Focus indicators3:1 for the indicator against the surrounding colours (WCAG 2.4.11, added in 2.2)
Theoretical maximum21:1 — pure black #000000 on pure white #ffffff
Lowest grey that passes on white#767676 at about 4.54:1
Not coveredAPCA (a WCAG 3 draft), colour-blindness simulation and OS forced-colours modes

When to use it

  • Choosing a muted grey for secondary text, which is the single most common contrast failure on marketing sites — the ratio is worth checking before the colour reaches a design token.
  • Auditing dark mode, where a light-theme palette gets inverted and the mid-tones collide.
  • Checking buttons, form placeholders, disabled states and focus rings, since non-text contrast has its own 3:1 rule that text checks do not cover.
  • Responding to an accessibility audit or an automated Lighthouse report by finding the exact failing pair and the smallest change that fixes it.
  • Picking a brand accent that still works as text, rather than discovering after launch that the brand colour only passes at 24 px.

Is it private?

Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.

Frequently asked questions

4.5:1 for normal-sized text, 3:1 for large text (24 px or larger, or 18.66 px bold) and 3:1 for non-text UI such as icons, borders and focus rings. 7:1 is the AAA level for normal text if you are aiming for enhanced conformance.

It measures about 4.54:1 against #ffffff — the lightest neutral grey that still clears the 4.5:1 AA threshold. One step lighter, #777777, drops just below it, which is why that specific value shows up in accessibility guidance.

Yes. Placeholder text is text, so WCAG 1.4.3 applies to it. Exceptions exist for text that is purely decorative or part of an inactive control, but a greyed-out placeholder inside a live input still needs 4.5:1.

No. The ratio is a floor, not a design goal — a pair can pass at 4.6:1 and still look washed out, particularly in small sizes or with a thin font weight. The preview below the ratio is there to judge that, and APCA is the newer perceptual model being drafted for WCAG 3.

No. Contrast ratio is luminance-only and says nothing about hue discrimination, which is a separate WCAG 1.4.1 requirement — never rely on colour alone to convey meaning, and check hue-dependent pairs with a colour-blindness simulator.

Related tools

  • Color Converter
  • SEO Audit
  • Image to Icon Converter
  • Readability Score Checker
  • Meta Tag Generator

Written and maintained by Md. Nur Hossain Repon.

NHRepon


Md. Nur Hossain Repon expert in NextJS, React, React Native and Flutter. He is a full-stack web and mobile application developer with 5+ years of experience and a passion for building innovative and robust application. Also, he has a strong background in developing high-quality web and mobile applications using the latest technologies and frameworks.
Let's build something amazing together 🚀

Quick Links


  • About
  • Projects
  • Services
  • Contact
  • Posts
  • Products
  • Privacy Policy
  • Terms of Service
  • Tools
  • Smart Life Hubs

Newsletter


We respect your privacy. Unsubscribe anytime.

Connect


© 2026 NHRepon. All rights reserved.

Build v1.5.4+56.73c4a90