Color in Data Visualization
This gallery example visualizes five fundamental color-scale patterns—sequential, diverging, categorical, highlight, and alert—through a grid of annotated mini bar charts. Each pattern shows how color encodes quantitative or categorical data, using palettes like blues for sequential, diverging browns and greens, and gray tints with accent colors for highlighting. The D3 v7 code uses `scaleLinear` and `scaleBand` to compute bar heights, while custom wrapping logic measures text via `getComputedTextLength`. The layout is fixed with responsive container sizing, and the visualization is based on concepts from "The Big Book of Dashboards."
AI-generated descriptionA re-creation / reimagining of a classic graphic on color from "The Big Book of Dashboards" by Steve Wexler, Jeffrey Shaffer, and Andy Cotgreave.
Color Scale Patterns in Data Visualization
This infographic demonstrates the five basic color-scale patterns used in data visualization:
Color Scale Types
- Sequential - Color is ordered from low to high, typically encoding quantitative or ordinal data
- Diverging - Two sequential colors with a neutral midpoint, used for scales showing two different outcomes
- Categorical - Contrasting colors for individual comparisons, each representing a specific category
- Highlight - Color used to call attention to specific data points, used with gray tints
- Alert - Color used to get user attention, using attention-grabbing colors like red or orange
Each pattern is illustrated with a mini bar chart, color swatches, and descriptive text to demonstrate the appropriate use case and visual encoding.