liveBook · Manning

Color scale

As explained in Everyday Data Visualization

A color palette that assigns colors along a continuous progression to represent ordered values in continuous data.

A color scale, also called a color ramp or continuous palette, assigns colors along a smooth progression so continuous values communicate both order and magnitude. section 4.3.1

Use these design guidelines when building a scale:

  • Start with one hue, then vary lightness or saturation so larger values visibly carry more color. section 4.3.1
  • Vary lightness as well as saturation to preserve distinctions in black and white and improve color-vision accessibility. section 4.3.1
  • Consider two hues when a single-hue gradient lets low values disappear into the background or fails to provide enough contrast. section 4.3.1
  • Choose a diverging scale when both low and high extremes deserve emphasis rather than only the larger values. section 4.3.1

A single-hue sequential scale

A scale can hold hue at 270 degrees in HSL space while moving saturation from 0% to 100% and lightness from 100% to 50%, creating a progression from white to full color.

Figure 4.22 A continuous sequential color palette, made in HSL space by selecting hue = 270, varying the saturation from 0% (no color) to 100% (full color), and varying the lightness from 100% (white) to 50% (full color).
04-22

Inspect how a continuous sequential palette changes as saturation and lightness vary across HSL space. section 4.3.1

How Everyday Data Visualization covers it

How deep it goes
Defines color scales through paths in color space and explains sequential design, but does not detail implementation beyond generated palettes.
Examples
Shows HSL ramps, single- and two-hue gradients, alternate color spaces, and sequential-versus-diverging legends.
What it assumes
Assumes familiarity with continuous and ordered values, while introducing palette types and hue, saturation, and lightness choices.
What you can do after
Apply it via D3 to map continuous values with sequential or diverging palettes while checking contrast and accessibility.
How it connects
Connects continuous data with sequential palettes, diverging palettes, color spaces, hue, saturation, lightness, and color accessibility.

Also explained in

Compare how 5 books explain color scale →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Everyday Data Visualization. The section links point to the parts of the book it draws on.