MCPcopy Create free account
hub / github.com/microsoft/SandDance / colorToString

Function colorToString

docs/app/js/sanddance-app.js:6992–6998  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

6990 }
6991}
6992function colorToString(color) {
6993 const c = [
6994 ...color
6995 ];
6996 if (c.length > 3) c[3] /= 255;
6997 return `rgba(${c.join(",")})`;
6998}
6999function desaturate(color, value) {
7000 const rgb = (0, _d3Color.rgb)(color[0], color[1], color[2], color[3] / 255);
7001 const hslColor = (0, _d3Color.hsl)(rgb);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected