function css(name) { return "rgb(" + getComputedStyle(document.documentElement).getPropertyValue(name) + ")"; } Chart.defaults.font.size = 14; Chart.defaults.backgroundColor = css("--color-primary-300"); Chart.defaults.elements.point.borderColor = css("--color-primary-400"); Chart.defaults.elements.bar.borderColor = css("--color-primary-500"); Chart.defaults.elements.bar.borderWidth = 1; Chart.defaults.elements.line.borderColor = css("--color-primary-400"); Chart.defaults.elements.arc.backgroundColor = css("--color-primary-200"); Chart.defaults.elements.arc.borderColor = css("--color-primary-500"); Chart.defaults.elements.arc.borderWidth = 1;