#101828 on #ffffff
- AA normal text
- Pass
- AA large text
- Pass
- AAA normal text
- Pass
- AAA large text
- Pass
This pair clears WCAG 2.2 AA for normal text. Also check focus, hover, disabled, and meaningful non-text states.
Pick or paste two hex colors, calculate their contrast ratio, see WCAG 2.2 AA and AAA results, and get a nearby AA text-color suggestion when normal text fails.

#101828 on #ffffff
This pair clears WCAG 2.2 AA for normal text. Also check focus, hover, disabled, and meaningful non-text states.
Recent contrast checks will appear here.
Color contrast checks run locally and use WCAG contrast math for quick design accessibility checks.
Inputs and recent answers stay in this browser tab and are not sent to a server.
Check text color against a page background before publishing.
Compare brand colors against WCAG AA and AAA thresholds.
Test button, label, and navigation color pairs.
Repair a near-miss text color without guessing at random hex values.
17.7465943159:1, AA and AAA normal pass
4.7604112926:1, AA normal pass and AAA normal fail
4.4780894536:1, with #767676 suggested for AA normal text
Need a slower walkthrough, a related tool, or the full library? These links keep you close to the task you started.
Plain-language answers about when to use the tool, what it does with your inputs, what to double-check, and how privacy works.
Use it when your task matches one of these common needs: Check text color against a page background before publishing. Compare brand colors against WCAG AA and AAA thresholds. It works best when you already know the exact foreground text color and background color as #RGB or #RRGGBB hex values.
In plain language: The checker normalizes #RGB or #RRGGBB hex colors, converts each sRGB channel to linear light, calculates relative luminance, then uses the WCAG contrast formula: (lighter luminance + 0.05) / (darker luminance + 0.05). When normal text fails AA, it also samples small RGB moves toward black and white and returns the shortest passing foreground change. The examples on the page are there so you can compare your inputs with a filled-out example before copying the answer.
Text color: pick a swatch or paste the foreground hex color for the text, icon, label, or button copy you want people to read. Background color: pick or paste the exact hex color directly behind that foreground color, not a nearby surface color. Contrast ratio: the lighter relative luminance divided by the darker relative luminance after WCAG adds 0.05 to both sides. AA normal text: passes when the ratio is at least 4.5:1 for typical body text. AA large text: passes when the ratio is at least 3:1 for large or bold text that meets the WCAG large-text size rule.
Read the headline answer, then check the supporting lines and examples to understand how the calculator got there. If one input changes, rerun the tool and compare the new answer instead of guessing.
Contrast ratio is one accessibility check. The suggested color changes only the foreground and is not a W3C-approved palette choice. Also review actual font size and weight, focus states, selected states, meaningful icons, color-only cues, and the real page background. Also check the actual font size, font weight, state, theme, and page background because a color pair can pass in one component and fail in another.
For most normal text, WCAG AA needs at least 4.5:1. Large text can pass AA at 3:1. If the result is close to the line, test the real font size, weight, and state before approving the color pair.
WCAG AAA is stricter: 7:1 for normal text and 4.5:1 for large text. AAA can be hard to meet with some brand palettes, so use it as a stronger readability target when the design can support it.
#777777 on #ffffff is about 4.4780894536:1. That is very close, but it is still below the 4.5:1 AA normal-text threshold, so the checker marks normal text as fail while large text can pass.
No. A passing ratio is important, but it does not check font size, line height, focus outlines, hover states, disabled controls, icons without text, color-only meaning, or whether the color sits on a gradient or image.
Yes. A button, tab, link, or form field can change text color, border color, background color, or outline color in each state. Test the exact colors for the real state people will see, especially focus and selected states.
You can use the ratio as a quick check, but decide whether the element is text, non-text UI, or decorative. Meaningful icons, focus outlines, and control borders often need their own contrast check against the adjacent color.
The calculation keeps the background fixed and samples small RGB moves from the entered foreground toward black and white. It returns the passing option with the shortest RGB distance. Treat it as a practical starting point, not a W3C-approved brand color.
No. The tool runs in your browser tab. Your recent answers stay only on the page while you use it, and they are not sent to a server.