Chart color palette generator Give your data the colors it needs.

Choose the data type, compare the chart and keep the export context.

Choose colors for the data

Start with the data type, then inspect the chart in context.

See the colors in a chart

Preview the palette on numbered sample data. Compare chart types and viewing conditions with the controls.

Chart preview with numbered sample series12345
Sample data; numbers identify colors. Swatches show the selected vision model, while copied values and exports retain the original colors.

Color alone cannot communicate every distinction. Keep direct labels, markers or patterns and inspect the actual chart.

Inspect the closest pair

Minimum Euclidean OKLab D65 distance among all pairs, native scale. Machado severity 1.0 simulations are clipped and rounded to sRGB; no universal visibility threshold is applied.

Normal vision

Protanopia model

Deuteranopia model

Tritanopia model

Colors against the chart background

3:1 is a reference for meaningful graphical boundaries. This table checks only each original color against the chosen background, not all adjacencies or text.

ColorRatioResult
1 · #285fd45.71:1At least 3:1
2 · #dc4d004.11:1At least 3:1
3 · #00715d5.97:1At least 3:1
4 · #9d47be5.15:1At least 3:1
5 · #674f007.79:1At least 3:1

Use the result

{
  "settings": {
    "kind": "categorical",
    "count": 5,
    "seed": "#2563eb",
    "end": "#e11d48",
    "background": "#ffffff",
    "reverse": false,
    "vision": "normal",
    "preview": "bar"
  },
  "colors": [
    "#285fd4",
    "#dc4d00",
    "#00715d",
    "#9d47be",
    "#674f00"
  ],
  "background": "#ffffff",
  "contrastAgainstBackground": [
    {
      "index": 0,
      "color": "#285fd4",
      "ratio": 5.709935201247524,
      "passes": true
    },
    {
      "index": 1,
      "color": "#dc4d00",
      "ratio": 4.113872261381309,
      "passes": true
    },
    {
      "index": 2,
      "color": "#00715d",
      "ratio": 5.965716526196497,
      "passes": true
    },
    {
      "index": 3,
      "color": "#9d47be",
      "ratio": 5.1490072526751,
      "passes": true
    },
    {
      "index": 4,
      "color": "#674f00",
      "ratio": 7.791901900945778,
      "passes": true
    }
  ],
  "closestPairs": [
    {
      "mode": "normal",
      "value": 0.13427438852713952,
      "pair": [
        2,
        4
      ]
    },
    {
      "mode": "protanopia",
      "value": 0.036480898967998936,
      "pair": [
        0,
        3
      ]
    },
    {
      "mode": "deuteranopia",
      "value": 0.07785121929783537,
      "pair": [
        0,
        3
      ]
    },
    {
      "mode": "tritanopia",
      "value": 0.05909546588616074,
      "pair": [
        0,
        2
      ]
    }
  ],
  "lightness": [
    0.5204070302106706,
    0.6101413294979162,
    0.4896933715399626,
    0.5593208169276368,
    0.44039268415518373
  ],
  "sequentialLightnessMonotonic": null,
  "visionModel": "Machado, Oliveira & Fernandes (2009), severity 1.0; linear sRGB, clipped, rounded to 8-bit",
  "differenceMethod": "Euclidean OKLab D65, native scale; no universal pass/fail threshold",
  "note": "Exports contain original colors. Examples use sample data. Color, labels, markers and real adjacency must be reviewed together."
}

CSS exports variables; JSON includes the original palette and diagnostics. ECharts and Chart.js exports are palette integration snippets, not complete chart configurations or continuous-scale implementations.

Color calculations run in your browser. The website still loads assets, advertising and analytics.

Give your data the colors it needs.

Start with the data type, then inspect the chart in context.

Data palette type

A category, an ordered value and a change around a midpoint tell different stories. Choose the palette type first, then check the order and appearance in a bar chart, line chart or heatmap with numbered sample data.

Three ceramic swatch tracks suggesting categorical, sequential and diverging palettes

Colors against the chart background

Colors need to work with the chart background, labels and markers. Inspect simulated views and the closest pair without treating a single difference value as a universal safety certificate.

Light and dark chart boards with colored bars and distinct marker shapes

How to choose chart colors

Start with the data type, then inspect the chart in context.

01

Data palette type

Select categorical for groups, sequential for ordered values or diverging for a meaningful midpoint. Set the color count and source colors.

02

See the colors in a chart

Try the real chart background and sample layouts. Inspect original-color contrast, simulated views and the closest pairs, then review labels and markers.

03

Use the result

Copy individual original HEX values or download code and diagnostics. Add your own data and any continuous scale configuration in the chart library.

Chart color palette generator FAQ

Choose the data type, compare the chart and keep the export context.

When should I choose categorical, sequential or diverging?

Use categorical for unordered groups, sequential for low-to-high values and diverging for values around a meaningful midpoint. The data type determines the color task; these are not interchangeable decoration styles.

How many colors can I generate?

Categorical and sequential support 2–8 colors. Diverging uses 3, 5 or 7 so there is one center swatch. More categories become harder to distinguish; direct labels, grouping and markers may help more than additional hues.

Will the starting color appear exactly in the result?

Not necessarily. It seeds hue and chroma; generated lightness and sRGB mapping can change the value. Diverging uses both endpoints. These are original OKLCH-based rules, not ColorBrewer, viridis or other named preset implementations.

Why do some colors fall below 3:1 against the background?

Light sequential steps or a diverging midpoint can have low contrast with a light background. The table is a reference for each original color against the backdrop, not a complete WCAG assessment of adjacent areas, labels or an entire chart.

Does the vision simulation guarantee color-blind safety?

No. It uses Machado 2009 severity 1.0 endpoint models in linear sRGB, followed by clipping and 8-bit rounding. Real perception varies. Closest-pair OKLab distances have no universal pass threshold; use labels, markers and patterns too.

Why check sequential lightness?

Ordered data should have an interpretable progression. The check reports whether exported colors have monotonic OKLab lightness after mapping and rounding. It is a numeric diagnostic, not proof of equal visual steps in every context.

Are copied colors affected by the simulated preview?

No. The chart and swatches show the selected model, while HEX copies and every export contain the original palette. Numbered sample data are illustrations, not analysis of your own dataset.

What do the exports include, and are colors uploaded?

CSS provides variables, JSON saves settings and diagnostics, and ECharts/Chart.js snippets show palette integration. You supply data, series and any continuous value mapping. Calculations are local; valid settings persist in the full URL for reloads and language changes. The site still loads assets, advertising and analytics.

Technical references: ColorBrewer · Machado et al. (2009) · WCAG 2.2

Give your data the colors it needs.

Choose the data type, compare the chart and keep the export context.

Color alone cannot communicate every distinction. Keep direct labels, markers or patterns and inspect the actual chart.