On this page

To check a card’s contrast, compare the color of its visible surface with the page color immediately beside it. Enter those two values in a contrast checker, then look at the card in its surrounding layout to decide whether its boundary is clear enough for its purpose.
The ratio helps you describe the separation between two colors, but it does not settle every design decision on its own. A decorative card and a card whose boundary helps someone recognize a control may need different consideration. Check the text and meaningful controls inside the card separately, and repeat the comparisons wherever the background or theme changes.
Identify the two neighboring colors
Start at the card’s edge. The first color is the visible card surface; the second is the page surface directly outside it. Think of the comparison as asking what meets what: the background behind the card’s content on one side, and the surrounding page on the other.
If you have access to the color values, note both before opening a checker. If you do not, use a color picker available to you, or ask the person who supplied the design for the values. Record which value belongs to the card and which belongs to the page so you can repeat the comparison after making changes.
Look around the full boundary. A card may sit beside one color along the top and another along the bottom, or its own surface may vary. In that case, identify the combinations that meet at different parts of the edge. Check each relevant pair rather than relying on a single sample from the middle of the card.
Account for variations
Make a short list of the versions someone might encounter. For example, a light theme might place a pale card on a light page, while a dark theme uses a different pair. If the card appears against more than one page background, note those combinations too.
A useful record is simply “card surface, adjacent page surface, and where they meet.” It gives you a starting point for checking the boundary and makes it easier to revisit a specific combination later.
Compare the surface colors
Open a contrast checker and enter the card surface value and its neighboring page value. Use the input format requested by the checker available to you. Read the resulting ratio as a measure of separation between that pair, and keep the values with the result so you know exactly what you compared.
Contrast ratios use relative luminance. The ratio runs from 1:1 for identical colors to 21:1 for black and white. A result closer to 1:1 indicates less separation than a higher result. For example, if you try a revised card color and receive a higher ratio against the same page color, the revised pair has more separation by that measure.
Use the result as a starting point
A ratio does not explain what the boundary does in the layout. Before deciding whether the result is suitable, ask whether the edge communicates information, identifies an interactive control, or merely adds decoration. Do not assume that one numerical threshold applies to every decorative card.
If you need to assess a particular accessibility requirement, check the applicable guidance for the role of the element you are evaluating. The Section508.gov guide to accessible color usage is one place to start. Keep that question separate from the simpler comparison of the two surface colors.
If the card or page changes color along the edge, enter the additional pairs you identified. A single result describes the values entered for that comparison; it cannot stand in for a different pair elsewhere on the page.
Judge the boundary in context
Return to the whole layout after checking the colors. Look at the card where a reader will encounter it, with its surrounding content visible. Can you tell where the card ends and the page begins? More importantly, would that distinction help someone understand or use what is on the page?
A card might group a heading, description, and related information. In that case, consider whether a reader can recognize the grouping if the surface edge is subtle. A heading or the arrangement of the content may help communicate the relationship. If the grouping depends on the visible edge, an unclear boundary deserves closer attention.
The decision is different when a boundary helps identify something a person can interact with. Ask what the reader is expected to recognize and whether that is clear in the surrounding layout. Do not judge only an isolated swatch: the content, adjacent areas, and other visual cues all belong to the decision.
Questions to work through
- Which parts of the edge are easy or difficult to distinguish?
- Does the boundary convey a grouping, identify an interactive control, or serve mainly as decoration?
- If the surface colors appear similar, is another visual cue available to communicate the same distinction?
- Does the answer change when the card appears on another background or in another theme?
Write down the specific problem you observe. “The lower edge blends into the page in the dark theme” gives you a more useful next step than “the card needs more contrast.” It also tells you which neighboring colors to check after a revision.
Improve a hard-to-see edge
If the boundary needs to be clearer, try changing the card surface color, the neighboring page color, or both. Make one deliberate change at a time when practical, then compare the revised pair and inspect the card in context. This makes it easier to see which change addresses the problem you identified.
A border is another option. If you add one, consider how it appears against the surfaces it touches. Compare the border with the neighboring card and page colors where those comparisons matter, then look at the entire boundary. A border should help readers recognize the distinction you intend; its presence alone does not answer that question.
You can also consider another visual cue that fits the layout. Choose it for the information the card needs to communicate, and check whether the intended distinction remains understandable in the actual page. If the card is decorative, you may decide that a subtle edge is acceptable. If its boundary carries meaning, assess the cue against that purpose and any applicable requirements.
Recheck after a change
Keep a small before-and-after record: the original neighboring values, the revised values, and the ratio for each comparison. Add a note about what you saw in the layout. If you changed the page color, revisit other relevant edges against that page; if you changed the card surface, revisit the content displayed on it.
Repeat the process for each relevant theme or background variation. A change that improves one pairing may need a separate adjustment elsewhere. The goal is a clear result for the combinations readers will encounter, rather than a single favorable ratio recorded in isolation.
Check content inside the card
Once you have considered the outer edge, check the content separately. Compare text with the color immediately behind it, and check meaningful controls against the colors immediately behind or beside them, as appropriate to what needs to be distinguished. The card-to-page ratio does not tell you whether those internal elements are clear.
Start with the main text, then move through headings, supporting text, and any meaningful controls. For each item, identify the two neighboring colors involved and enter those values in the checker. If a control has more than one relevant neighboring color, consider each comparison needed to understand its appearance. Use the applicable accessibility guidance when deciding what requirements apply to text or controls.
For example, suppose you darken a card surface to make its edge stand out from the page. Recheck the text against that new surface, even if the text color has not changed. Also inspect any meaningful control that sits on the revised surface. The change solved one comparison, but it created a different pair for the content.
Finish with each relevant version
Repeat the boundary and content checks in every theme or background variation you identified at the start. A pair that works in a light theme can fail when the background changes in a dark theme. Record the version alongside each result so you can find and correct a specific problem without confusing it with another version.
Before finishing, review the page again as a reader would: identify the card’s content, understand any grouping the boundary is meant to show, and locate meaningful controls. If a distinction remains unclear, note the exact pair or cue involved, revise it, and check the affected comparisons again.