Spaces:
Paused
Paused
Download node_modules/@plotly/d3/src/interpolate/rgb.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/interpolate/rgb.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/d3/src/interpolate/rgb.js
-
curl -L -o rgb.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/interpolate/rgb.js
428 Bytes
| import "../color/rgb"; | |
| d3.interpolateRgb = d3_interpolateRgb; | |
| function d3_interpolateRgb(a, b) { | |
| a = d3.rgb(a); | |
| b = d3.rgb(b); | |
| var ar = a.r, | |
| ag = a.g, | |
| ab = a.b, | |
| br = b.r - ar, | |
| bg = b.g - ag, | |
| bb = b.b - ab; | |
| return function(t) { | |
| return "#" | |
| + d3_rgb_hex(Math.round(ar + br * t)) | |
| + d3_rgb_hex(Math.round(ag + bg * t)) | |
| + d3_rgb_hex(Math.round(ab + bb * t)); | |
| }; | |
| } | |