MCPcopy Create free account
hub / github.com/idank/explainshell / d3_interpolateHsl

Function d3_interpolateHsl

explainshell/web/static/js/d3.v3.js:4967–4975  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

4965 }
4966 d3.interpolateHsl = d3_interpolateHsl;
4967 function d3_interpolateHsl(a, b) {
4968 a = d3.hsl(a);
4969 b = d3.hsl(b);
4970 var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
4971 if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
4972 return function(t) {
4973 return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
4974 };
4975 }
4976 d3.interpolateLab = d3_interpolateLab;
4977 function d3_interpolateLab(a, b) {
4978 a = d3.lab(a);

Callers

nothing calls this directly

Calls 1

d3_hsl_rgbFunction · 0.85

Tested by

no test coverage detected