(name, fallback)
| 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 |