On this page

To check a button or interface icon, first identify the visual feature a person needs in order to recognize or understand it. Compare that feature’s color with the color immediately next to it, then use a contrast checker and compare the result with the relevant accessibility criterion. Check a button’s text separately against the background behind the text.
One button can require several comparisons: its label against its fill, its visible edge against its surroundings, and any state indicator against the color beside it. An icon may also have several meaningful parts. Work through each comparison in the context where it appears, especially when the background changes. The steps below help you record the pairs, interpret the results and decide what to revisit after a color change.
Identify what needs to be visible
Start with a specific screen and ask what a person needs to see to use the control. For a button, that might include the label, a surrounding shape or edge, and a visual cue indicating its current state. For an icon, look at the parts that convey its meaning rather than assuming that every decorative detail has the same role.
Next, find the color directly beside each feature. The outside of a button may meet the page background, while its label sits on the button’s fill. A state cue might touch the fill, the surrounding background or both. These are different comparisons, even when they all belong to the same control.
Inspect the control in context
Look at the button in each relevant state available to you. For example, compare its ordinary appearance with any visible focus, selected or inactive appearance. Note what changes and which feature communicates that change. If you cannot view a state, record it as something to inspect when it becomes available.
Ask yourself: could someone identify the control and understand the state from the visible cues? Make a short list of the features involved before opening a checker. This keeps you focused on the comparisons that help someone use the interface.
Collect color pairs for each check
For every feature on your list, record its color and the color immediately next to it. A color picker can help you obtain values to enter into a contrast checker. Take care to select the feature itself and the adjacent area you intend to compare; a color elsewhere on the screen may not represent that boundary.
A simple record can keep the checks organized:
| Feature | First color | Adjacent color | Context to record |
|---|---|---|---|
| Button label | Label color | Fill behind the label | State being viewed |
| Button edge | Edge or fill color | Surrounding color | Where the edge meets the background |
| State cue | Cue color | Color beside the cue | State and location |
| Meaningful icon detail | Detail color | Color beside the detail | What the detail communicates |
Use a separate row whenever a feature meets a different adjacent color. If an icon sits partly over one color and partly over another, inspect the meaningful parts against the colors beside them. If a gradient or image lies behind a feature, check relevant locations where the adjacent color changes; a single sampled pair may not represent the whole area.
For text over a changing background, consider avoiding direct placement over it. A solid background behind the text can provide a more consistent surface to check. Record the actual pair used after any such adjustment.
Check the contrast and interpret the result
Enter the two recorded colors into a contrast checker as its foreground and background inputs. For a label, the foreground is the text color and the background is the color behind it. For an edge or icon detail, use the feature color and its adjacent color. Read the resulting contrast ratio and record it beside the pair so you can trace the result back to the screen and state you inspected.
Then compare the result with the criterion relevant to that feature. A label calls for a text contrast check; visual information needed to identify a control, its state or a meaningful icon calls for a non-text contrast assessment. Consult the applicable WCAG guidance to determine the requirements and any exceptions for your particular case. The Section508.gov guide to making color usage accessible is a useful starting point.
A ratio is only as useful as the pair entered. Before relying on a result, confirm that the sampled colors are actually adjacent, that you checked the intended state and that the relevant background has not changed. If several pairs describe the same feature, evaluate each applicable comparison rather than treating one result as a verdict on the entire button.
If a result does not meet the criterion you are applying, record the feature and context that need attention. That makes the next color adjustment easier to review.
Review button labels and states separately
Check the button label against the immediate background behind its letters. Then return to the visual information that helps identify the control and understand its states. A legible label does not by itself answer whether a state cue or boundary is distinguishable; those checks use their own relevant pairs.
Work through the states
For each state you can inspect, write down what a person is expected to notice. If a button gains an outline when focused, identify the outline and the colors it touches. If a selected state changes the fill or adds a mark, check the relevant visible features in that state. Repeat the label comparison if the color behind the text changes.
An inactive-looking control deserves its own note. Identify how it appears and consult the applicable guidance before deciding whether an exception applies. Do not assume that a result for an ordinary state settles the question for every other state, or that an exception for one feature settles the label and surrounding information as well.
If you are reviewing a screen without access to every state, list the missing views in your notes. Someone with access can then inspect them using the same feature-and-adjacent-color method, rather than relying on the appearance of a single screenshot.
Assess meaningful icons and color-dependent cues
Look at each icon in the context of the message or action it represents. Identify the parts needed to understand it, then compare those parts with the colors immediately beside them. An icon with an internal mark and an outer shape may need more than one recorded pair if both parts contribute to its meaning.
Also ask what happens when color is the cue that distinguishes a message or state. Is there a label, a recognizable shape or another visible indicator that communicates the same information? Consider the cue as it appears to the reader, including any nearby text. If the meaning is unclear without relying on the color difference, identify an additional cue to consider and check it in context.
For example, a field error could be identified with a warning icon alongside a light red background. Inspect the icon’s meaningful features against their adjacent colors, and consider whether any accompanying message explains the issue. The background color and the icon serve different purposes in the review; checking one does not complete the other.
Where an icon appears in several states or against several backgrounds, repeat the relevant comparisons for each context. Keep notes on the meaning being conveyed as well as the measured pairs: a strong contrast result cannot, on its own, establish that a reader will understand an ambiguous symbol.
Recheck after a color change
When a comparison needs improvement, adjust a color and test the resulting pair again. Keep the original context in view: changing a button fill to improve its edge against the page may also change the background behind its label or an icon inside it. A change that helps one comparison therefore creates a reason to revisit the others.
Use your record as a checklist. Find every row containing the changed color, update the value and rerun the relevant check. Then inspect the states and locations where that color appears. If a new background has been introduced, add its neighboring features and their color pairs to the list.
Finish by reviewing the control as a person would encounter it: read the label, identify the action, inspect the available state cues and consider whether meaningful icons or messages can be understood without color alone. Note any states or backgrounds you still need to inspect, along with the criterion you need to consult. Keeping those notes beside the results makes a later review easier and helps prevent one successful ratio from being mistaken for a complete assessment.