A button looks like one color decision. It is actually two. The label has to read against the button's own fill, and the whole button has to hold up wherever it sits, including on a colored section where the pairing effectively inverts. Links add a third case: link text inside a paragraph, judged against the page background at reading size. Teams routinely check one of these and ship the others untested.
This guide works through the pairs a button and a link really involve, the thresholds each one is judged against, and how to test them with the free Color Contrast Checker on Ovatly, which measures any pair with the WCAG 2.1 relative luminance formula and reports pass or fail for AA and AAA.
Contents
- Quick answer
- A button is two pairs, not one
- Which threshold applies to labels and links
- Links inside body text
- How to check buttons and links, step by step
- Worked example: one brand blue, three jobs
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Check every pair the reader will actually meet. For a button, enter the label color and the fill color in the Color Contrast Checker and read the normal-text rows, because most labels are normal size: AA needs 4.5:1 and AAA needs 7:1. Then use Swap colors to test the inverse pairing for buttons placed on colored sections. For a link, check the link color against the page background at normal text size. The ratio is symmetric, so a pair that passes one way passes the other; what changes is the threshold your text size must meet.
A button is two pairs, not one
The first pair is the obvious one: label text against button fill. White letters on a blue button, dark letters on a pale button. That pair decides whether the button's words can be read at all, and it is the pair most people check.
The second pair appears when the button is placed on a colored section. A pale button on a dark band, or a dark button on a tinted panel, creates a new relationship with its surroundings, and the label still has to survive inside it. The practical way to test it is the checker's Swap colors control, which reverses the two colors so you can read the inverse pairing's ratio and preview without retyping anything. If the same button appears on white sections and colored sections, check both arrangements: a fill chosen against a white page may behave very differently against a dark one.
Which threshold applies to labels and links
WCAG sorts text into two size classes. Normal text needs 4.5:1 for AA and 7:1 for AAA. Large text, defined as at least 18pt, or 14pt bold, needs only 3:1 for AA and 4.5:1 for AAA. Everything smaller counts as normal text, however important it feels.
Most button labels and nearly all in-text links are normal text by that definition. A typical call to action label is set well under 18pt, so it is judged at 4.5:1 for AA. That is the number to design to. AA is also the level most laws and procurement rules reference, which makes it the practical target; AAA is the stricter option to take when the palette allows it. Do not borrow the large-text rows for a button unless the label genuinely meets the size definition.
Links inside body text
A link inside a paragraph is text against the page background, at the paragraph's size. That almost always means the normal-text rows: 4.5:1 for AA, 7:1 for AAA. The check is the same as for any body text: link color in one field, page background in the other.
The checker measures color pairs and nothing else. Whether a reader can tell a link apart from surrounding text without relying on color alone is a real design question, but it sits beyond the pair ratio, and this tool does not answer it. Treat a passing ratio as the color half of link design, not the whole of it.
How to check buttons and links, step by step
- Open the Color Contrast Checker and enter the label color as the text color and the button fill as the background color.
- Read the ratio and the preview at the top of the results, then check the AA and AAA rows for normal text, since most labels are normal size.
- Click Swap colors to test the inverse pairing, the arrangement you get when the same two colors trade places on a colored section.
- Repeat the check for your link color against the page background.
- If a pair fails, darken the failing color one step at a time and re-check until it passes.
Worked example: one brand blue, three jobs
Take the blue #2563EB on white, #FFFFFF. The checker measures this pair at 5.17:1.
As a button fill with a white label, that is 5.17:1 against the normal-text rows: it passes AA, which needs 4.5:1, with room to spare. As link text on a white page, the same pair gives the same 5.17:1, because the ratio is symmetric, and passes AA at normal size too. One measurement covers both jobs.
Now read the AAA rows. AAA for normal text needs 7:1, and 5.17:1 falls short of it in both directions. So this blue is a sound AA button fill and a sound AA link color, but it is not an AAA choice at reading size. If AAA is the target, darken the blue one step at a time until the pair reaches 7:1, and keep the original bright blue for large headings, borders and graphics, where the thresholds are lower or absent.
Limitations and honest tradeoffs
The checker reports one pair at a time, computed with the WCAG 2.1 formula. It cannot judge a whole interface at once, and it says nothing about hover or disabled states; each distinct pair those states create needs its own check. Contrast is also only one part of readability: thin font weights and small sizes can still be hard to read at a passing ratio. And the tool measures color pairs only, so questions like whether a link is identifiable without color are outside what it reports, and this guide does not invent rules to fill that gap.
Common mistakes
- Checking only the label against the fill. The button also lives on sections of the page, and the inverse pairing goes unchecked.
- Judging a small label by the large-text rows. A label under 18pt, or under 14pt bold, is normal text and needs 4.5:1 for AA.
- Assuming direction changes the score. It does not. The ratio is symmetric, so re-testing a swapped pair gives the same number; what matters is testing pairs you have not measured.
- Recoloring the whole brand when one pair fails. Darken the failing color a step at a time for the failing role, and keep the bright original where thresholds allow it.
- Treating a passing link ratio as the whole link design. The ratio covers color only, not whether the link can be recognized by other means.
FAQs
What contrast ratio does a button label need? Button labels are usually normal text size, so WCAG AA requires at least 4.5:1 against the button fill. AAA for normal text requires 7:1. Only a genuinely large label, at least 18pt or 14pt bold, is judged against the lower large-text rows of 3:1 for AA and 4.5:1 for AAA.
Does white text on a blue button score the same as blue text on a white page? Yes. The contrast ratio is symmetric, so the two arrangements of the same pair always produce the same number. What changes is which size threshold your text has to meet, not the ratio itself.
What if my brand color fails as a button fill? Darken the color one step at a time and re-check until the pair passes, then use the darkened version for the fill. Reserve the original bright version for large headings, borders and graphics, which have lower thresholds or none.
Should buttons and links meet AA or AAA? AA is the level most laws and procurement rules reference, so it is the practical target for buttons and links: 4.5:1 for normal text and 3:1 for large text. AAA is stricter at 7:1 and 4.5:1, and worth choosing for body text when the design allows it.
Does the checker tell me whether my link is recognizable without color? No. The Color Contrast Checker measures a text color against a background color and reports the ratio. Whether a link can be identified by something other than color alone is a design question beyond the pair ratio, and the tool does not answer it.
Conclusion
Buttons and links pass or fail as pairs: label against fill, the inverse pairing on colored sections, and link text against the page. Check each real pair in the Color Contrast Checker, judge small labels and links by the normal-text rows, and darken a failing color one step at a time rather than redesigning around it. Size has its own rules and traps, and our guide to checking contrast for large text and headings covers them in full. For more guides in this series, see our Color and Design Tools guides.
References
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1, on contrast minimums for text: https://www.w3.org/TR/WCAG21/#contrast-minimum
- W3C, WCAG 2.1, on the enhanced contrast criteria for AAA: https://www.w3.org/TR/WCAG21/#contrast-enhanced