MCPcopy Create free account
hub / github.com/csskit/csskit / getChartTheme

Function getChartTheme

website/script/benchmarks.js:89–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87};
88
89function getChartTheme() {
90 const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
91 if (isDarkMode) {
92 return {
93 mode: "dark",
94 palette: "palette4",
95 };
96 } else {
97 return {
98 mode: "light",
99 };
100 }
101}
102
103function getChartOptions() {
104 const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;

Callers 4

getBaseChartConfigFunction · 0.85
setupThemeObserverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected