📄 d3/d3-scale-chromatic/sequential

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

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

Skip to content

On this page

Sequential schemes

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

Sequential color schemes are available as continuous interpolators (often used with d3.scaleSequential ) and as discrete schemes (often used with d3.scaleOrdinal ).

Each discrete scheme, such as d3.schemeBlues , is represented as an array of arrays of hexadecimal color strings. The _k_th element of this array contains the color scheme of size k; for example, d3.schemeBlues[9] contains an array of nine strings representing the nine colors of the blue sequential color scheme. Sequential color schemes support a size k ranging from 3 to 9.

To create a sequential discrete nine-color scale using the Blues color scheme:

js

const color = d3.scaleOrdinal(d3.schemeBlues[9]);

To create a sequential continuous color scale using the Blues color scheme:

js

const color = d3.scaleSequential(d3.interpolateBlues);

interpolateBlues(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Blues” sequential color scheme represented as an RGB string.

interpolateGreens(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Greens” sequential color scheme represented as an RGB string.

interpolateGreys(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Greys” sequential color scheme represented as an RGB string.

interpolateOranges(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Oranges” sequential color scheme represented as an RGB string.

interpolatePurples(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Purples” sequential color scheme represented as an RGB string.

interpolateReds(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “Reds” sequential color scheme represented as an RGB string.

interpolateTurbo(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “turbo” color scheme by Anton Mikhailov .

interpolateViridis(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “viridis” perceptually-uniform color scheme designed by van der Walt, Smith and Firing for matplotlib, represented as an RGB string.

interpolateInferno(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “inferno” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

interpolateMagma(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “magma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

interpolatePlasma(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “plasma” perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, represented as an RGB string.

interpolateCividis(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “cividis” color vision deficiency-optimized color scheme designed by Nuñez, Anderton, and Renslow , represented as an RGB string.

interpolateWarm(t)


Source · Given a number t in the range [0,1], returns the corresponding color from a 180° rotation of Niccoli’s perceptual rainbow , represented as an RGB string.

interpolateCool(t)


Source · Given a number t in the range [0,1], returns the corresponding color from Niccoli’s perceptual rainbow , represented as an RGB string.

interpolateCubehelixDefault(t)


Source · Given a number t in the range [0,1], returns the corresponding color from Green’s default Cubehelix represented as an RGB string.

interpolateBuGn(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “BuGn” sequential color scheme represented as an RGB string.

interpolateBuPu(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string.

interpolateGnBu(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string.

interpolateOrRd(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string.

interpolatePuBuGn(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string.

interpolatePuBu(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string.

interpolatePuRd(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string.

interpolateRdPu(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string.

interpolateYlGnBu(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string.

interpolateYlGn(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string.

interpolateYlOrBr(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string.

interpolateYlOrRd(t)


Source · Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string.

schemeBlues[k]


Source · The “Blues” discrete sequential color scheme of size k in 3–9.

schemeGreens[k]


Source · The “Greens” discrete sequential color scheme of size k in 3–9.

schemeGreys[k]


Source · The “Greys” discrete sequential color scheme of size k in 3–9.

schemeOranges[k]


Source · The “Oranges” discrete sequential color scheme of size k in 3–9.

schemePurples[k]


Source · The “Purples” discrete sequential color scheme of size k in 3–9.

schemeReds[k]


Source · The “Reds” discrete sequential color scheme of size k in 3–9.

schemeBuGn[k]


Source · The “BuGn” discrete sequential color scheme of size k in 3–9.

schemeBuPu[k]


Source · The “BuPu” discrete sequential color scheme of size k in 3–9.

schemeGnBu[k]


Source · The “GnBu” discrete sequential color scheme of size k in 3–9.

schemeOrRd[k]


Source · The “OrRd” discrete sequential color scheme of size k in 3–9.

schemePuBuGn[k]


Source · The “PuBuGn” discrete sequential color scheme of size k in 3–9.

schemePuBu[k]


Source · The “PuBu” discrete sequential color scheme of size k in 3–9.

schemePuRd[k]


Source · The “PuRd” discrete sequential color scheme of size k in 3–9.

schemeRdPu[k]


Source · The “RdPu” discrete sequential color scheme of size k in 3–9.

schemeYlGnBu[k]


Source · The “YlGnBu” discrete sequential color scheme of size k in 3–9.

schemeYlGn[k]


Source · The “YlGn” discrete sequential color scheme of size k in 3–9.

schemeYlOrBr[k]


Source · The “YlOrBr” discrete sequential color scheme of size k in 3–9.

schemeYlOrRd[k]


Source · The “YlOrRd” discrete sequential color scheme of size k in 3–9.