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.
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.
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.
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.
Also covered in
What to know first
- CSSCSS (Cascading Style Sheets) is a stylesheet language for specifying the presentation and layout of structured documents.
- digital imageA digital image is a digital representation of visual content, commonly encoded as an arrangement of pixels or other graphical elements.
- headingA heading is a textual or semantic label that introduces or identifies a section of content and may indicate its level in a document hierarchy.
Related concepts
- rotationconfigured by · A rotation is a geometric transformation that turns points or objects around a fixed point or axis by an angle while preserving distances and angles.
- radial-gradient functionincludes · The CSS radial-gradient() function creates an image whose colors transition outward from a central point or shape according to specified color stops.
- choropleth mapused by · A choropleth map is a map visualization that represents data values for geographic regions using varying colors or shades.
- color spaceuses · A color space is a defined coordinate system for representing colors using specified components, dimensions, or numerical values.
- color stophas part · A color stop is a specified color at an optional position that defines part of a gradient transition.
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.




