FIELDNOTES / GUIDE

How to Check Contrast Between Stacked Bar Segments

Contents
AI-generated illustration; not taken on location · Illustration of stacked bars with neighboring segment boundaries highlighted.
AI-generated illustration; not taken on location · A conceptual chart highlights boundaries between touching segments.AI-generated illustration

To check contrast in a stacked bar chart, list the segment colors that touch, compare each pair in a contrast checker, and record the results. Then review the boundaries readers need to understand the data. Adjust colors or try a separator where a boundary is difficult to distinguish, and check labels and the chart background separately.

A single comparison rarely covers the whole chart. Different bars may place categories next to different neighbors, and a boundary that is clear in one part of the chart may need attention elsewhere. Work through the chart systematically, then review the finished version at the size and in the format readers will use.

Identify the boundaries to check

Start with one bar and follow the segments in order. Write down every pair that shares an edge. If the first bar contains categories A, B and C in that order, your initial list is A–B and B–C. There is no need to compare A–C for that bar unless those two segments also touch somewhere else.

Repeat the exercise for every bar. Add a pair to the list whenever a new combination appears. For example, another bar ordered A, C and B introduces A–C; the B–C pair is already on the list. You can compare a repeated pair once if the displayed colors are the same, while noting each place where it appears so you can inspect those boundaries later.

Pay particular attention to charts that include negative values: stack order can change. Trace the segments on each side of the baseline and check which categories actually meet, rather than assuming every bar follows the same order.

Mark the outside edges too

Note where a segment touches the chart background, especially where that edge helps a reader see the extent of the bar. Record the background as another color to check. If the chart has more than one background behind its bars, note which one meets each segment.

Finally, mark the boundaries that carry information a reader needs. A boundary may show where one category ends and another begins, or where the bar ends against its background. This list will help you decide which results need attention first.

Collect colors and compare each pair

Find the color value for each segment in the chart’s settings, source data or design file, if you have access to them. Record the background and any existing border colors as well. If you only have an image of the chart, a color picker can help you inspect the displayed colors. Choose a point within each segment and note the value it reports; repeat the process for the background.

Use the colors that represent the version readers will see. If you are unsure whether a value from the chart settings matches the displayed result, compare it with the displayed chart and investigate any difference before relying on the result. Keep a note of where each value came from so you can repeat the check after an edit.

Enter the two values for one touching pair into a contrast checker and record the ratio it returns. Follow the checker’s instructions for the color format it accepts. Then repeat for the remaining pairs, including relevant segment-to-background edges. A simple working table can keep the task manageable:

Boundary First color Second color Result Follow-up
A–B A’s value B’s value Record ratio Review if needed
B–C B’s value C’s value Record ratio Review if needed
A–background A’s value Background value Record ratio Check outside edge

These are placeholders, so replace them with your own values and results. If you cannot obtain a reliable displayed color, flag that pair for further investigation instead of guessing. Keep the table alongside the chart as you make changes: it gives you a clear list of what to measure again.

Interpret the results and improve boundaries

Review the recorded ratios alongside the purpose of each boundary. Start with edges a reader needs to distinguish to understand the chart, then consult the applicable non-text contrast guidance for your situation. The checker supplies a measurement; deciding what it means requires knowing what the boundary communicates and which guidance applies.

Section508.gov’s guidance on accessible color use is a useful starting point for that review. Check the relevant guidance before deciding whether a particular result is sufficient. Also look at the chart itself: a recorded result is most useful when considered alongside the way the boundary appears in the finished graphic.

Try a color change or a separator

If a meaningful boundary needs improvement, consider changing one or both segment colors. Enter the revised values into the checker and compare the pair again. Then check every other boundary involving a changed color, including any edge against the background. A change that helps A–B should also be reviewed wherever A or B touches another color.

A separator between segments is another option. Check the separator color against each neighboring segment, not just one of them. If the same separator is used elsewhere, check it against the colors it touches there too. Record these comparisons in your table so the reason for the change remains clear.

Inspect the separator’s effect on the chart as well. Does its thickness make a small segment harder to see or alter the apparent size of a segment? If so, adjust the treatment and review the chart again. The goal is a boundary that helps readers distinguish the data without making the bars misleading.

Make categories readable without color alone

Give readers another way to identify categories and understand values. Direct labels can put a category name, a value, or both close to the segment they describe. Depending on the chart and the space available, you might also use distinct patterns, annotations or a clearly organized accompanying table. Choose cues that remain understandable together and are explained where necessary.

Begin with the question a reader is likely to ask: which category does this segment represent? Then check whether the answer is available without matching its color to a legend. For a compact chart, a label inside each sufficiently large segment might be practical. For smaller segments, consider placing labels outside the bar and connecting or arranging them clearly. Check that labels do not obscure neighboring values or make it unclear which segment they describe.

Check the labels separately

Treat text as its own contrast check. Compare each label color with the background immediately behind that label, using the guidance that applies to the text. A label placed inside a segment needs a separate review from a label placed on the chart background. If a label crosses more than one background, check its readability against each one or change its placement.

Provide an appropriate text alternative for the chart as well. Explain the chart’s subject and the main comparison or takeaway, and make the underlying values available in a suitable text format when readers need them. For example, a table alongside the chart can pair each bar and category with its value. Review the alternative against the finished chart so category names, values and any important qualifications agree.

Recheck the finished chart

After editing, return to your boundary list and update it to match the final chart. Recheck any pair affected by a change to segment colors, separators, the background or stack order. If a new pair now touches, add it to the list and measure it. If you moved or recolored a label, review its contrast against its new background too.

Inspect the chart in the intended display, at the size readers will encounter. Follow the segments across each bar, look for boundaries that are difficult to follow, and check whether labels are legible and clearly associated with the right data. Review small segments and separators with particular care, since their presentation can affect how easily readers interpret them.

Finish by comparing the chart with its text alternative or accompanying table. Ask yourself whether a reader can identify the categories, find the relevant values and understand the main comparison without depending on color. If the answer is unclear, revise the labels or explanation and inspect the result again. Keep your recorded color pairs and ratios with your working notes so future chart edits are easier to review.

Sources

← Return to the tools