📄 d3/d3-scale-chromatic/categorical

File: categorical.md | Updated: 11/15/2025

Source: https://d3js.org/d3-scale-chromatic/categorical

Skip to content

Return to top

Categorical schemes

=============================================================================================

For example, to create a categorical color scale using the Accent color scheme:

js

const color = d3.scaleOrdinal(d3.schemeAccent);

schemeCategory10


Source · An array of ten categorical colors represented as RGB hexadecimal strings.

schemeAccent


Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeDark2


Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeObservable10


Source · An array of ten categorical colors represented as RGB hexadecimal strings.

schemePaired


Source · An array of twelve categorical colors represented as RGB hexadecimal strings.

schemePastel1


Source · An array of nine categorical colors represented as RGB hexadecimal strings.

schemePastel2


Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeSet1


Source · An array of nine categorical colors represented as RGB hexadecimal strings.

schemeSet2


Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeSet3


Source · An array of twelve categorical colors represented as RGB hexadecimal strings.

schemeTableau10


Source · An array of ten categorical colors authored by Tableau as part of Tableau 10 represented as RGB hexadecimal strings.