MCPcopy Create free account
hub / github.com/Rello/analytics / cssColor

Function cssColor

js/visualization.js:1410–1412  ·  view source on GitHub ↗
(name, fallback)

Source from the content-addressed store, hash-verified

1408 applyThemeToChartOptions: function (chartOptions, chartCanvas) {
1409 const styles = window.getComputedStyle(chartCanvas || document.body);
1410 const cssColor = function (name, fallback) {
1411 return styles.getPropertyValue(name).trim() || fallback;
1412 };
1413 const textColor = styles.color || cssColor('--color-main-text', '#222222');
1414 const textChannels = textColor.match(/[\d.]+/g);
1415 const gridColor = textChannels && textChannels.length >= 3

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected