text
Text below the WCAG large-scale definition. Checks 4.5:1 at AA and 7:1 at AAA against its declared background.
Palette contrast worksheet · WCAG 2.2 · opaque sRGB only
Paste 2–20 named colors, give each one a role, and select the color pairs that really touch. The matrix calculates every ratio; result cards apply text or non-text thresholds only where the selected roles make them relevant.
Step 1
Step 2
Use the selectable upper half. The lower half mirrors the same ratio.
No adjacency is assumed. Select a pair only when the two solid colors touch in the use you are reviewing. For text, the other color must be the actual background. For UI/state/graphic information, it must be the actual adjacent color.
Enter a valid palette to build the matrix.
Step 3
0 selected pairs · result UNKNOWN
Select an adjacency to see the luminance calculation.
Worked example
For opaque #767676 against #FFFFFF, this worksheet calculates about 4.542225:1. That clears the WCAG 2.2 AA threshold for ordinary text (4.5:1), but not the AAA threshold (7:1). A number displayed as 4.54 is not what the pass/fail check uses: the code compares the unrounded ratio. The roles and real adjacency still need to be checked in the actual interface.
Role guide
textText below the WCAG large-scale definition. Checks 4.5:1 at AA and 7:1 at AAA against its declared background.
large-textText you have independently confirmed is at least 18pt, or at least 14pt and bold (or the applicable equivalent). Checks 3:1 at AA and 4.5:1 at AAA.
ui-stateColor needed to identify an active UI component or state, or an essential graphical object. Checks 3:1 at AA against the declared adjacent color.
surfaceA background or surface. It creates no requirement by itself, but can be the adjacent color for a text or non-text role.
decorativeColor you assert is irrelevant to meaning or operation. It creates no requirement by itself. This tool cannot verify that the use is truly decorative.
Important: role assignment is a user claim, not something this arithmetic can observe. Inactive controls, logotypes, browser-default controls, essential presentation and other exceptions require contextual review.