Contents

To check text contrast, identify the text color and the background color immediately behind it, then enter both into a contrast checker. Note the resulting ratio, establish whether the text qualifies as large under WCAG guidance, and compare the unrounded ratio with the applicable WCAG AA threshold.
A useful check starts with the colors actually used for the text and its background. It also accounts for different states, such as placeholder, hover and focus text. If a pair falls short, adjust a color and check the new pair again. A passing result for one sample is useful, but it does not settle every accessibility question about the text or the page.
Identify the text and background colors
Start with one specific piece of text. Identify its foreground color and the background directly behind the letters. For example, if a label sits inside a colored button, check the label against that button color. If the same label also appears elsewhere, make a separate note of its other background.
Look for the underlying color values wherever they are available. You might find them in a design document, a color specification, or the settings of the application where the text is being edited. Record both values in a format accepted by your chosen checker. If you use a color picker, first verify that it can provide values you can use for the pair you want to test.
What if the text looks soft on screen?
The visible edge of a letter may look lighter than its defined text color. Anti-aliasing can make thin or unusual fonts appear fainter, so a sample taken from a softened edge may not represent the underlying text color. When you have access to the defined foreground value, use it instead of relying on an edge sample. Keep the visible appearance in mind as a separate reason to review the text after the numerical check.
If the background changes behind the words, identify the relevant areas instead of assuming one value describes them all. Record which color pair belongs to which sample. Where the effective colors are uncertain, check how to obtain the values for the actual display before treating a result as a decision about that text.
Measure the contrast ratio
Choose a contrast checker and confirm what inputs it accepts and what result it provides. Enter the foreground value as the text color and the corresponding background value as the background color. If you are transferring values between applications, check the characters carefully: a typo can turn the test into a check of a different pair.
Read the resulting contrast ratio and note which text sample it describes. Also record the exact values you entered, the text size and weight if known, and the state being checked. These notes make it easier to repeat the check after a change or compare results with someone else.
Read the result before deciding
A ratio is a measurement for the entered pair; the pass decision depends on the requirement that applies to the text. Do not rely solely on a pass label until you know which standard, text category and precision the checker used. A checker may present a concise result, so inspect its available information to find out whether it shows enough detail for your comparison.
For a simple record, write something like: “Button label, normal state: foreground value, button background value, reported ratio, text size and weight.” Replace each description with the actual information from your sample. Repeat the process for another label or background rather than applying the first result to every part of a design.
If you cannot tell what a tool accepts, how it calculates its result, or how much precision it shows, verify those points before using its output to make a borderline pass decision.
Decide whether the text is large
Before selecting a threshold, establish the text’s size and weight and check the current WCAG guidance for the large-text criteria. A word that looks large on your screen is not, by itself, enough information to decide which category applies. Record the actual size and weight for the sample you measured, then use the applicable criteria to classify it.
The guidance equates 14 CSS points to approximately 18.5 CSS pixels and 18 CSS points to approximately 24 CSS pixels. These conversions help when the size is reported in different units, but size alone may not answer the classification question: check the relevant weight requirement as well. If you cannot find the size or weight, ask the person responsible for the text or check the application’s text settings before making the comparison.
Consider appearance as well as classification
A font can meet the relevant size and weight criteria yet still deserve a careful visual review. Anti-aliasing can make thin or unusual fonts appear fainter than their defined color. Look at the actual text in context and consider whether a stronger color pair or a more legible presentation would help, even when the measured pair meets the applicable requirement.
Keep the classification attached to the specific sample. A heading and a smaller instruction can use the same colors but require separate decisions about the applicable threshold. If the text changes size or weight in another presentation, check the criteria for that presentation too. When in doubt, resolve the size and weight first rather than guessing from how prominent the words appear.
Compare the result and improve a failing pair
Once you have the ratio and the text classification, check the applicable WCAG AA threshold in the current guidance. Compare the unrounded result with that threshold. The distinction matters at the boundary: a displayed value may look sufficient because it has been rounded, while the underlying result is still below the required value.
For example, if the applicable threshold for a particular check is 4.5:1, a result of 4.49:1 is below it, even if a display rounds the number to 4.5:1. Likewise, if the applicable threshold is 3:1, a result of 2.99:1 is below it. These examples illustrate the comparison; establish which threshold applies to your actual text before deciding. If the checker does not expose enough precision to make a borderline comparison, verify the result with a method that does.
Adjust, record, and check again
If the pair fails, change the text color, the background color, or both, and enter the revised values into the checker. Record the new ratio alongside the revised pair. Continue until the unrounded result meets the applicable threshold, then review the text in its actual setting.
A practical way to keep changes manageable is to adjust one color at a time and retain the other value while you compare alternatives. For instance, try a darker text color against a light background, then measure the new pair. Do not assume the change worked simply because the words look stronger: use the resulting ratio to make the comparison.
If a color appears in several places, check each relevant pairing after changing it. A change that helps one sample still needs a separate check against another background.
Check text in context
A page can contain many text and background pairs. Review the combinations readers encounter, including placeholder text and text shown in hover or focus states where those states are present. For each sample, identify the relevant colors, obtain the ratio, and check the size and weight before choosing the applicable requirement.
Use a small checklist to keep track of the work:
- Identify the text and the state being reviewed.
- Record the foreground and the background immediately behind it.
- Check the ratio and the criteria for its text category.
- Note the result and repeat the check after any color change.
When a state changes a color, measure the resulting pair instead of assuming the normal-state result still applies. If text appears over more than one background, consider each relevant area. If you are unsure what colors are actually presented, resolve that question before relying on the recorded ratio.
Could an exception apply?
Some text may be subject to an exception in the WCAG guidance. Do not assume that an exception applies just because text is decorative, temporary, or part of a particular interface element. Check the exact wording and conditions of the relevant guidance for the sample you are assessing. If its status is unclear, seek an accessibility review and document the reason for the decision.
Finally, look at the words as a reader would encounter them. The measurement addresses the entered color pair; it does not by itself establish that every state, background, or accessibility concern has been reviewed. Keep your notes so a later review can see what was tested and which decisions still need attention.