Spaces:
Paused
Paused
Download node_modules/@plotly/d3/src/interpolate/hsl.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/interpolate/hsl.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/d3/src/interpolate/hsl.js
-
curl -L -o hsl.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/interpolate/hsl.js
525 Bytes
| import "../color/hsl"; | |
| d3.interpolateHsl = d3_interpolateHsl; | |
| function d3_interpolateHsl(a, b) { | |
| a = d3.hsl(a); | |
| b = d3.hsl(b); | |
| var ah = a.h, | |
| as = a.s, | |
| al = a.l, | |
| bh = b.h - ah, | |
| bs = b.s - as, | |
| bl = b.l - al; | |
| if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as; | |
| if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; | |
| else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path | |
| return function(t) { | |
| return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + ""; | |
| }; | |
| } | |