This module implements the HSLuv (Hue, Saturation, Lightness) color space.
If you use NPM,
npm install d3-hsluv. AMD, CommonJS, and vanilla environments are supported. In vanilla, a
d3 global is exported:
Constructs a new hsluv color. The channel values are exposed as
v properties on the returned instance.
If l, u and v are specified, these represent the channel values of the returned color; an opacity may also be specified. If a CSS Color Module Level 3 specifier string is specified, it is parsed and then converted to the hsluv color space. See d3.color for examples. If a color instance is specified, it is converted to the RGB color space using color.rgb and then converted to hsluv.
Returns an HSLuv color space interpolator between the two colors a and b. The colors a and b need not be in HSLuv; they will be converted to HSLuv using d3.hsluv. If either color’s hue or chroma is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string.
Like interpolateHsluv, but does not use the shortest path between hues.