Contents

To check text contrast on a colored chart, compare the label’s text color with the color directly behind it. If the label crosses a segment boundary, check it against every background it touches. Compare each resulting ratio with the target that applies to that label, then revise and check again where needed.
A useful review also looks beyond the ratio. Segment boundaries may need their own treatment, and readers should be able to understand categories without depending on color alone. The steps below take you from a list of color pairs to a final check of the chart in context.
Identify each label and its backgrounds
Start by listing the text that readers need to see: segment names, values, percentages and any other labels placed on or near the chart. Include small annotations and text outside the chart if they sit on a colored background. Treat labels with different colors, sizes or styles as separate items so you can choose the appropriate target for each one later.
For every label, record its text color and the background directly beneath its letters. Use the color values provided by the chart or design application if they are available. If you need to identify a color from the rendered chart, use a color picker where possible and record the value it reports. Check that the value represents the visible area you intend to test.
A label does not necessarily have just one background. If part of a word sits on one segment and the rest sits on another, list both segment colors. Also include any chart background or other area touched by the letters. A simple working table can keep the checks organized:
| Label | Text color | Backgrounds to check |
|---|---|---|
| Category A | Recorded text value | Segment A |
| Shared label | Recorded text value | Segment A and Segment B |
When the background varies
Transparency, gradients and images can make the visible color behind letters vary. Check the rendered background in the areas the text actually covers, including areas that appear hardest to distinguish from the text. If you cannot identify a reliable set of colors to test, consider moving the label to a consistent background or adding a solid label background, then check the resulting pair. Do not assume a single segment color describes every point beneath the label.
Compare text and segment colors
For each pair on your list, enter or select the text color and its background color in a contrast checker. Use the color values in the format that the checker accepts. Record the ratio it returns alongside the label and background, so you can tell which combinations still need attention.
Contrast ratios use relative luminance. The number gives you a way to compare a particular text-and-background pair with a target; a color that looks distinct on one segment should still be checked against another segment. For a label crossing two segments, make two checks using the same text color: one against the first segment and one against the second. Repeat for every additional background touched by the letters.
Choose the target for the label
Before deciding whether a result is sufficient, establish the accessibility standard and conformance target you are using, then check which contrast requirement applies to the label’s size and style. Do not assume that every label qualifies for the same target. If you are unsure how the standard treats a particular label, consult the applicable guidance or ask the person responsible for accessibility on the project. Section508.gov’s color accessibility guidance is one place to begin.
Compare each measured ratio with that applicable target and mark each pair as meeting it or needing revision. For example, if a shared label meets its target on Segment A but falls short on Segment B, the label still needs attention where it crosses B. Keep the individual results: a single overall judgment for a multicolored chart can hide a problem with one label.
Fix labels that are hard to read
When a pair falls short of its target, choose a change that makes the label clear while preserving the chart’s meaning. The best choice depends on how much of the chart the change affects and whether the label must remain on that segment.
- Change the text color. Try another text color, then check it against every background the label touches. A change that helps on one segment may make the same label harder to read on another.
- Adjust the segment color. Try a different segment color and check it against all text placed on that segment. Also review how the changed segment relates to its neighbors and to any category key.
- Move the label. Place it where its letters sit fully on a suitable background, or outside the segment if its relationship to the data remains clear. Check the text against its new background and make sure the label still identifies the intended segment.
- Give the label a consistent background. A solid area behind the text can simplify a varied background. Check the text against that area and make sure the area does not obscure information readers need.
Decide which change is clearest
Suppose a label crosses two segments and fails only on the second. First see whether a text color can meet the target against both. If that makes other labels inconsistent or still leaves one pair short, moving the label entirely onto a suitable area may be easier to understand. Alternatively, adjust the second segment if doing so preserves the category distinctions.
After any change, update your list and repeat every affected check. This includes neighboring labels when a segment changes, as well as every background crossed by a recolored or moved label. Keep the change that produces a readable result without making the chart’s relationships harder to follow.
Check segment boundaries and meaning
Readable text and distinguishable chart segments are related but separate checks. A label can meet its text contrast target while the boundary between two segments remains difficult to see. Look at adjoining segments, especially where their separation carries information the reader needs, and assess the boundary under the accessibility guidance that applies to your chart.
A W3C technique suggests testing adjoining colors and, when their contrast is insufficient, adding a border that contrasts with each color. If you add a border, review it against both neighboring segments. Then check nearby labels again if the border now sits behind or touches their letters.
Make categories understandable without color alone
Ask whether a reader can connect each value to its category without relying solely on the segment’s color. Direct category names, values, or other distinct cues can help. Choose cues that fit the chart and remain understandable in the available space. If you use a key, make sure its entries can be matched to the chart through more than color alone.
For example, a chart with two adjacent segments could name both categories directly rather than asking readers to distinguish the categories only by their fills. If there is not enough room for clear labels, consider placing them outside the chart with an unambiguous connection to the relevant segments. Recheck text and backgrounds after making that change.
Finally, read the chart as a whole: can someone identify the categories, associate their values with the right segments, and see the boundaries that matter? A passing text ratio answers only part of that question.
Review the finished chart
Check the completed chart at the size and in the context in which readers will encounter it. Look at the labels, category cues and meaningful boundaries together. A result that was easy to inspect while editing may need another look when the chart is placed alongside other content or reduced to its intended size.
Work through the chart once more with your recorded pairs:
- Confirm that each label still sits on the background or backgrounds you checked.
- Recheck labels that moved, wrap differently, overlap another element or cross a new boundary.
- Recheck every affected pair if text colors, segment colors or label backgrounds changed.
- Check that the category names, values and other cues still correspond to the correct segments.
- Review the final version for labels or boundaries that remain difficult to distinguish, even after the numerical checks.
For a chart that may appear in more than one layout, inspect each intended version. If a label moves across a boundary in one version, add the newly covered background to its checks. If transparency, a gradient or an image changes what appears behind the letters, check the visible areas in that version or give the label a consistent background.
Keep your list of colors, ratios and applicable targets with your working notes so future edits can be checked efficiently. When a chart is updated, begin with the elements that changed and trace their effects: a revised segment may affect several labels, a boundary and a category cue. The review is complete when the relevant pairs meet their targets and the chart’s information remains clear in its finished context.