A pair of colors can look fine on a bright monitor and fail the moment the text is small. WCAG 2 contrast is a ratio of relative luminance. AA for normal text is 4.5 to 1. AA for large text and for interface controls is 3 to 1. AAA for normal text is 7 to 1, and AAA for large text is 4.5 to 1. Large text means roughly 18pt and up, or 14pt bold and up. This page computes the ratio and marks each of those four bars pass or fail.
The opening pair is text #202134 on background #ffffff. The ratio is 15.81 to 1, about 15.8 to 1, and every bar passes, including AAA for normal text. That is a near-black ink on white, which is why it clears so easily. The interesting failures are the brand colors: a mid teal on white, a white label on a bright yellow, a gray on a slightly different gray. Swap the two fields if you had the ink and the paper backwards. The ratio is the same either way. The words 'text' and 'background' are for you, not for the math.
The checker sees flat colors. It does not see a photo behind the letters, a text-shadow, or a gradient stop under only half the word. If the type sits on an image, sample the lightest and darkest pixels that actually touch the glyphs and run both pairs.
Text #202134, background #ffffff.
Contrast: 15.81:1. AA normal text: Pass. AA large text and controls: Pass. AAA normal text: Pass. AAA large text: Pass.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
4.5 to 1 for normal text, and 3 to 1 for large text and for meaningful interface boundaries. AAA raises normal text to 7 to 1 and large text to 4.5 to 1.
About 15.8 to 1, reported as 15.81:1. It passes AA and AAA for both normal and large text.
About 18pt (24px) regular, or 14pt (about 18.5px) bold. Smaller than that, use the 4.5 to 1 bar for AA.
The ratio is the same if you swap them. Label them correctly so you remember which one is the type.
The real page has an image, a gradient, or a shadow under the letters. This tool compares two flat colors. Sample the actual pixels behind the word.
No. 3 to 1 is the large-text and control threshold. Body copy at that ratio fails AA.