HIYSL REFERENCE / FIELD NOTES

How to Test Contrast Between Chart Colors

Contents
AI-generated illustration; not taken on location · Illustrative chart with contrasting colors, distinct patterns, and direct labels.
AI-generated illustration; not taken on location · Color, patterns, and labels can work together to distinguish chart data.AI-generated illustration

To test chart colors, start by identifying what a reader must distinguish: neighboring categories, marks against the background, and labels against the colors behind them. Compare each meaningful color pair, then look at the chart as a whole to see whether the information remains understandable.

A contrast result is one part of the review. Some color combinations can still be difficult to distinguish, so use direct labels, patterns, shapes, or a text alternative wherever color alone leaves the reader guessing.

Find the color differences that matter

Before opening a checker, write down what the chart asks the reader to see. A bar chart might ask readers to compare categories; a line chart might ask them to follow several series; a stacked chart might ask them to identify neighboring segments. Each task points to different color pairs worth reviewing.

Start with the marks and their immediate surroundings. If a blue bar sits on a pale background, consider the blue and the background together. If an orange segment touches a blue segment, consider orange and blue together too. Where a border separates two areas, include the border and each neighboring color in your review.

Next, look for distinctions that carry meaning even when the marks do not touch. Two lines may represent different groups across a chart, for example. A reader needs a dependable way to tell them apart wherever they appear, including where they cross or run close together.

Make a short list before testing:

  • Each mark color against the background behind it.
  • Colors of adjacent segments or other touching marks.
  • Series or categories that readers must distinguish from one another.
  • Borders, labels, and legend symbols against their actual backgrounds.

You do not need to treat every possible combination as equally important. Prioritize the pairs that affect the chart’s message. If changing a color would make a category impossible to identify, that distinction deserves a close look.

Check relevant color pairs

For each pair on your list, identify the colors actually used in the finished chart. Check the chart’s color settings if they are available, or use a color picker if you can obtain the relevant color values that way. Record which value belongs to which element: a list of numbers is much more useful when it says “first series,” “second series,” or “plot background.”

Use the color that appears behind the mark in the version readers will see. If a mark crosses areas with different backgrounds, note each relevant pairing. If transparency, overlays, or other styling affects the displayed color, check what the final appearance is before deciding which values to compare.

A contrast checker may ask for two color values and return a contrast ratio. Before relying on one, check what inputs it accepts and what its result represents. Contrast ratios use relative luminance, so the result is a comparison of the two colors rather than a complete assessment of the chart’s meaning. Consult the applicable guidance for your context when deciding what result to aim for; do not assume that one result answers every accessibility question.

Keep a practical test record

For a chart with two touching categories, your notes might look like this:

Pair to review Why it matters Next decision
First category and background Readers must see the first mark Adjust the mark or add another cue if needed
Second category and background Readers must see the second mark Review the result in the finished chart
First and second categories Readers must tell the categories apart Add labels, patterns, or a border if needed

After any change, compare the affected pairs again. A darker category color may improve its distinction from a light background while changing how it relates to the neighboring category. Look at the complete chart as well as the individual results, and check whether a reader can still identify each category without guessing.

Check labels separately

Text has its own contrast question: can the reader distinguish the label from the background directly behind it? Check a label placed inside a colored bar against that bar’s color, not just against the surrounding chart background. Check a label outside the bar against the area where the text actually appears.

Repeat the review when the same text color appears over different fills. A label style that works on one segment may need to change on another. If a label sits over more than one color, consider moving it, giving it a consistent background, or choosing another arrangement that keeps it readable.

Keep the text check distinct from the comparison between graphical elements. A clear label does not automatically make two adjacent segments easy to distinguish, and a clear boundary between segments does not automatically make text inside them readable. Both checks serve the reader, but they answer different questions.

When using a checker, confirm whether its guidance addresses text or graphical elements and look up the applicable criteria for the label you are reviewing. You can use the official Section508.gov color guidance as a starting point. Then inspect the finished chart: labels also need enough space to remain legible and connected to the correct marks.

Make the chart understandable without color alone

Once you have reviewed the pairs, ask a more practical question: if a reader cannot tell two colors apart, can they still understand what each mark represents? Add a cue that carries the same distinction in another way.

Direct labels can name categories on or beside their marks. An annotation can draw attention to the result the reader should notice. Patterns can differentiate neighboring areas, while shapes or different line treatments can help identify series. Borders can clarify where one area ends and another begins. Choose cues that suit the chart and remain distinct at the size it will be displayed.

For example, a stacked bar showing two groups could use a label for each segment as well as a different pattern. A chart with two series could place each series name near its line and use a distinct shape for its points. If a label would crowd the data, consider a clearer arrangement or a separate description rather than placing text where it obscures the marks.

Give readers the finding and the values

Write a short text alternative that states the main finding and identifies the categories being compared. For a chart showing a change over time, describe the meaningful direction or comparison using the chart’s actual data. Avoid an alternative that merely says “a chart” without explaining what the chart shows.

Provide a structured data table when readers need the exact values. Give its rows and columns clear headings, include units where relevant, and make sure the numbers match the chart. The description can explain the takeaway; the table can give readers access to the underlying values in text form. Review both whenever the chart data changes.

Review difficult palettes and color vision

A contrast ratio is useful, but a pair that meets a relevant requirement may still be difficult for some readers to distinguish. Look at the chart with that possibility in mind, especially when similar colors carry different meanings. Ask whether the reader can identify the categories using their labels, shapes, patterns, or positions as well as their colors.

Gradual color scales need a different kind of review from a chart with a few separate categories. If colors transition gradually across a scale, neighboring shades can be hard to separate. Tableau guidance notes that such palettes do not meet a 3:1 contrast ratio because of those gradual transitions. A single comparison between the two ends of a scale cannot tell you whether the intermediate values are understandable.

Consider what the reader needs to learn from the scale. If the goal is to identify exact values, include those values in labels or a structured table where practical. If the goal is to show a broad pattern, describe that pattern in text and label meaningful reference points. Where boundaries between ranges matter, consider whether explicit labels or other cues would make those boundaries clearer.

Finally, return to the actual reading task. Can someone follow each series, locate the important comparison, and find the values without relying on a subtle color difference? If the answer is uncertain, revise the chart and its supporting text, then review the affected color pairs and labels again. Keep the comparison results with your notes so future edits do not accidentally remove a useful distinction.

Sources