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

Function colorFromString

docs/app/js/sanddance-app.js:6983–6991  ·  view source on GitHub ↗
(cssColorSpecifier)

Source from the content-addressed store, hash-verified

6981 return true;
6982}
6983function colorFromString(cssColorSpecifier) {
6984 if (cssColorSpecifier) {
6985 const dc = (0, _d3Color.color)(cssColorSpecifier);
6986 if (dc) {
6987 const c = dc.rgb();
6988 return rgbToDeckglColor(c);
6989 }
6990 }
6991}
6992function colorToString(color) {
6993 const c = [
6994 ...color

Callers

nothing calls this directly

Calls 1

rgbToDeckglColorFunction · 0.70

Tested by

no test coverage detected