May 2019
Beginner to intermediate
650 pages
14h 50m
English
In the last chapter, we introduced the d3-interpolate module, which contains factories that generate interpolation functions for several types of data values. Color interpolation is one of the most common applications of its interpolation functions. The following table lists several color interpolator factories from d3-interpolate, and are used for colors and color spaces:
|
Function |
Description |
|
d3.interpolateHsl(a, b) d3.interpolateLab(a, b) d3.interpolateHcl(a, b) d3.interpolateCubehelix(a, b) |
These functions return a color space interpolator between two colors, a and b, using the shortest path between hues, for the HSL, CIELAB, HCL, and Cubehelix color spaces. |
|
d3.interpolateHslLong(a,b) d3.interpolateHclLong( ... |
Read now
Unlock full access