liveBook · Manning

Color scale

Also called color gradient

A color scale is a mapping from data values or categories to colors, often arranged as a continuous gradient or discrete set for visual representation.

How 5 Manning books explain it

CSS in Depth, Second Edition

A CSS-generated image in which colors transition across a region according to specified directions and color stops.

How it is used
Uses generated color transitions for backgrounds, depth effects, masks, and text-wrapping shapes.
How deep it goes
Works through gradient directions, stops, repetition, interpolation, and conic controls, including visual consequences and a browser-support fallback.
Examples
Builds a blue button, striped bar, fading mask, and diagonal image edge with aligned text flow.
What you can do after
Build it from scratch to create fades and stripes, then reuse gradients for depth, masking, or aligned text wrapping.

Read how CSS in Depth, Second Edition explains color scale →

D3.js in Action, Third Edition

A color gradient is a gradual transition between colors across a graphical region or element.

How it is used
Maps categorical or numerical data to colors in charts, hierarchical diagrams, and geographic visualizations.
How deep it goes
Explains ordinal and sequential domains, implementation, outlier handling, and application to SVG marks.
Examples
Uses donut charts, language-family circle packs, and Nobel-laureate choropleth maps with tooltips.
What you can do after
Build it from scratch with D3 by declaring domains, choosing ranges or interpolators, and applying colors to marks.

Read how D3.js in Action, Third Edition explains color scale →

Web Components in Action

A gradient is a visual transition in color or opacity across a spatial region.

How it is used
Builds a coordinate picker that maps pointer position onto saturation and brightness variations.
How deep it goes
Explains layered CSS gradients and pointer positioning, without descending into color-model theory.
Examples
Uses white and black overlay gradients above a red base in a draggable coordinate-picker demo.
What you can do after
Apply it via CSS linear-gradient and implement it in a draggable coordinate-picker component.

Read how Web Components in Action explains color scale →

Web Design Playground

A smooth transition between two or more colors across a visual area, including linear and radial forms in CSS.

How it is used
Adds visual interest to element backgrounds by transitioning between two or more colors.
How deep it goes
Defines linear and radial forms, then works through directions, color stops, CSS declarations, and fallback colors.
Examples
Uses colored div backgrounds, a three-color stop at 25%, and Playground exercises with angles and radial shapes.
What you can do after
Build it from scratch with CSS, or apply it via the Web Design Playground’s Gradient Construction Kit.

Read how Web Design Playground explains color scale →

Everyday Data Visualization

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

How it is used
Maps continuous data values to color so viewers perceive both their order and relative magnitude.
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 you can do after
Apply it via D3 to map continuous values with sequential or diverging palettes while checking contrast and accessibility.

Read how Everyday Data Visualization explains color scale →

Also covered in

What to know first

Related concepts

Questions about color scale

What is color scale?

A color scale is a mapping from data values or categories to colors, often arranged as a continuous gradient or discrete set for visual representation.

Which Manning books explain color scale?

CSS in Depth, Second Edition, D3.js in Action, Third Edition, Web Components in Action, Web Design Playground and Everyday Data Visualization.

What should I know before learning color scale?

Manning books that teach color scale usually introduce background-image property, CSS, digital image and heading first.

What kinds of color scale are there?

Kinds of color scale include radial-gradient function.

What is color scale a kind of?

Color scale is a kind of background-image property. The CSS background-image property specifies one or more images to render in an element’s background.

What are the parts of color scale?

Color scale includes color stop.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.