liveBook · Manning

Color

As explained in Data Storytelling with Altair and AI

Color is a visual attribute describing the hues or tonal properties represented in an image or visualization.

Color communicates a visual message by setting tone, creating emotional connection, directing attention, and linking data with the audience. Hue identifies the color family, saturation describes intensity, and brightness indicates lightness or darkness. section 8.2

Choose a palette according to the relationship the chart needs to show:

  • Use a sequential palette when quantitative values progress from high to low through gradients or saturation changes. section 8.2
  • Use a diverging palette when contrasting extremes and a lighter middle must show a spectrum such as cold to hot. section 8.2
  • Use a qualitative palette when separate hues distinguish categories rather than numerical magnitude. section 8.2
  • Assign a primary color to the main character, an alternative color to its adversary, and gray when pushing the adversary into the background. section 8.2

Changing the message with color

A population chart originally uses green for North America's trend. Changing the main chart to dark red (#963232) gives slower growth a more negative emphasis, while retaining green for the optimistic strategy chart preserves a constructive contrast. Set colors locally when one layered chart should remain unaffected by global configuration. section 8.2.2

Creating a negative visual context

A salmon chart emphasizing negative years combines a shocking disease image, dark red (#460805), and a thicker line over 1992–1998. The focused overlay uses transform_filter() to isolate the selected category and years. section 8.7.1

Figure 8.2 A sequential color palette
figure

Compare the sequential, diverging, and qualitative palette figures to match palette structure with the intended data relationship. section 8.2

How Data Storytelling with Altair and AI covers it

How deep it goes
Defines hue, saturation, brightness, palette types, and narrative emphasis, but defers detailed color theory to specialist references.
Examples
Uses population-growth charts, sequential/diverging/qualitative palettes, and a salmon chart with dark red emphasis and a focused overlay.
What it assumes
Assumes familiarity with charts and data-story roles while teaching color components, palette selection, and emotional signaling from basics.
What you can do after
Apply it via Altair by selecting palettes, setting local chart colors, and emphasizing filtered data with layered marks.
How it connects
Connects color with visual context, data storytelling, quantitative scales, qualitative categories, emotions, size, interactivity, and chart layering.

Also explained in

Compare how 4 books explain color →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Storytelling with Altair and AI. The section links point to the parts of the book it draws on.