Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Chart & Data Visualization Color Palette Generator

Pick or build chart colours that stay readable for everyone, then see them on real charts.

Design No upload Works offline Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 for 30 days

Try before you buy.

  • Free preview: every check, the palette on watermarked sample charts and the first half of its colour values and of its code; the code and the legend image stay locked.
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Palette

Data

Ordered values from low to high, such as income or temperature.

Chart background

Your palette

Colour-blind safety —

    How it looks to everyone

    Lightness

    Against the background

    On sample charts

    Bar chart · sample data
    Line chart · sample data
    Doughnut chart · sample data
    Tile map · sample data

    Colour values

    Code

    Next steps

    About the Chart & Data Visualization Color Palette Generator

    Make chart and map colours that work: for sequential data (low to high), diverging data (either side of a middle) or categorical data (groups), with 2 to 12 classes. Start from a proven scheme — the ColorBrewer schemes made for maps, the perceptually uniform viridis family (viridis, magma, inferno, plasma and the colour-vision-optimised cividis) or the Okabe–Ito colours of Color Universal Design — or enter your own colours and let the classes be interpolated in OKLCH.

    Every palette is checked as you change it: how far apart the classes stay for people with protanopia, deuteranopia and tritanopia (simulated with the Machado, Oliveira and Fernandes model) and in greyscale, whether lightness runs in order, and which colours are too pale against your chart background. You see the palette on a bar chart, a line chart, a doughnut and a tile map, and get its values. With a pass the palette comes out as code for JavaScript, D3, Python and matplotlib, R or CSS, and as a legend image. Everything runs in your browser.

    How to use it

    1. Choose what your data is: Sequential, Diverging or Categorical.
    2. Choose a scheme under Colours, or Your own colours to enter your own (two to five for sequential, low–middle–high for diverging, one per category for categorical).
    3. Set the number of classes, reverse the order if needed and, for the viridis family, the part of the ramp to use.
    4. Pick the chart background you will draw on, then read the checks: the colour-blind rating with the closest pair, the simulated strips, the lightness bars and the contrast against the background.
    5. Look at the sample charts, then choose a code format. With a Pro pass, Copy code, Code file and Legend PNG export the palette; in the free preview they are locked.

    Examples

    A red–green diverging scheme
    Input
    Diverging · Red–Yellow–Green (RdYlGn) · 9 classes
    Result
    Rated poor: under deuteranopia the two arms come within ΔE OK 0.004 of each other, so high and low values look alike. ColorBrewer itself rates this set not colour-blind friendly.

    Red–Blue (RdBu) or Purple–Orange (PuOr) keep the arms apart.

    viridis for a heat map
    Input
    Sequential · viridis · 7 classes
    Result
    Rated good: the smallest step between neighbouring classes is ΔE OK 0.082 or more under every simulated deficiency, and lightness rises steadily. The three lightest classes, greens to yellow, are below 3:1 on white.
    Eight categories
    Input
    Categorical · Okabe–Ito · 8 colours
    Result
    Rated fair: the closest pair under deuteranopia is ΔE OK 0.075 apart. The pastel Set2 with 8 colours is rated poor (0.014 under protanopia).

    Common uses

    • Choosing colours for a choropleth map, a heat map or a dashboard that must work for colour-blind readers.
    • Checking a brand’s chart palette before it goes into a reporting template.
    • Getting matplotlib, D3 or ggplot colours as code instead of copying HEX values one by one.
    • Testing whether a palette survives a black-and-white print or a dark dashboard background.

    Which type of palette

    • Sequential for ordered values with no special middle: population, sales, temperature. Light means low and dark means high (or the reverse on a dark background); the lightness should change steadily.
    • Diverging for values either side of a meaningful middle: change from zero, above and below an average. Two hues run out from a light middle, and both arms should match in lightness.
    • Categorical for groups with no order: countries, products, parties. Colours differ mostly in hue, and need to stay far apart, because each one has to be matched with a legend. The more categories, the closer the colours get; with many, label directly or group small ones.

    How the colour-blind check works

    The palette is converted the way people with full protanopia, deuteranopia and tritanopia would see it, with the physiologically based model of Machado, Oliveira and Fernandes, and in greyscale. Then the page measures the distance, ΔE OK in the OKLab colour space, between the classes that must be told apart: every pair for categorical palettes, neighbouring classes for sequential and diverging ones, and, for diverging palettes, matching classes of the two arms (the first and the last, the second and the second-to-last …), which must not look alike or low and high values are confused.

    The rating is this page’s own rule of thumb, based on CSS Color 4’s just-noticeable difference of 0.02: categorical pairs are good from 0.10 and fair from 0.05; neighbouring classes good from 0.06 and fair from 0.03; diverging arms good from 0.05 and fair from 0.03. The overall rating is the worst of the three deficiencies. For ColorBrewer schemes the page also shows ColorBrewer’s own rating; the two mostly agree.

    Lightness and contrast

    Lightness carries the order of a sequential scale, and the simulated deficiencies change it little, so the lightness bars show whether the order holds for everyone and how even the steps are. Diverging scales should have arms of matching lightness. In greyscale (a black-and-white print, or achromatopsia) only lightness is left, which is why the two arms of a diverging scale look the same there.

    WCAG 2.2 SC 1.4.11 asks for a contrast of at least 3:1 for the parts of a chart people need to see. Pale classes on white (or dark ones on a dark background) fall short: use them for filled areas next to darker ones, add outlines, or label the values.

    Where the colours come from

    • ColorBrewer: this product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). The schemes, by Cynthia Brewer and Mark Harrower of The Pennsylvania State University, are used under the Apache License 2.0. ColorBrewer publishes 3 to 9 classes (sequential), 3 to 11 (diverging) and up to 8, 9 or 12 (qualitative); other numbers of classes are interpolated in OKLab along its largest set, and the page says so.
    • viridis, magma, inferno and plasma: designed by Stéfan van der Walt and Nathaniel Smith (viridis with Eric Firing) for matplotlib, released under CC0. cividis, optimised for colour-vision deficiency, was designed by Jamie Nuñez, Christopher Anderton and Ryan Renslow; the page uses the d3-scale-chromatic approximation of it.
    • Okabe–Ito: the eight colours of Masataka Okabe and Kei Ito’s Color Universal Design, with the RGB values they publish; black is listed last here.

    Limitations

    • The simulation shows full dichromacy, the strongest form of each deficiency. Most colour-blind people have a milder anomalous trichromacy and see more difference than shown; monochromacy is rare.
    • The ratings are a rule of thumb for screen colours, not a guarantee: line width, area size, labels and the colours around the chart all change how well classes can be told apart.
    • The sample charts use made-up data to show the palette in use; they are not charts of your data.
    • In the free preview the values table and the code show their first half, the sample charts carry a watermark and the exports stay locked.

    Privacy

    Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

    Frequently asked questions

    What do I get without a pass?

    Without a pass, Chart & Data Visualization Color Palette Generator shows every check, the palette on watermarked sample charts and the first half of its colour values and of its code; the code and the legend image stay locked. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

    Which palettes are colour-blind safe?

    ColorBrewer rates all of its sequential schemes colour-blind friendly, and of its diverging ones Red–Blue, Purple–Orange, Brown–Blue-green, Pink–Yellow-green, Purple–Green and Red–Yellow–Blue; Red–Yellow–Green and Spectral are not, from 6 classes. viridis and cividis rate well on this page too. The number of classes matters, so check your exact choice.

    How many colours can a categorical palette have?

    Up to 12 here (Paired and Set3 have 12), but every extra colour makes the others harder to tell apart and to match with a legend, for everyone. With many categories, label lines and areas directly, or group small ones as “Other”.

    Why do the classes change when I go past 9?

    ColorBrewer publishes each sequential scheme for 3 to 9 classes. For 10 to 12 the page spaces the classes evenly along the 9-class set, interpolated in OKLab, and says so under the rating.

    Can I use the palette in matplotlib, ggplot or D3?

    Yes. The code formats include a Python list with a matplotlib ListedColormap, an R vector for ggplot’s scale_fill_manual(values = palette), and D3 scaleOrdinal or scaleQuantize scales.

    Is my data or are my colours sent anywhere?

    No. The schemes are part of the page, and the checks and sample charts are worked out in your browser.

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.