I'm using Chart.js with ChartKick:
https://github.com/chartjs/Chart.js
https://github.com/ankane/chartkick.js
I cannot find where the default colors are defined in their code for each new line/dataset that you add. E.g. see this chart below:
There are 8 lines, and I haven't set any of their colors explicitly; they are set by default automatically. Although I want to be able to refer to those colours for another more complex chart I'm defining so that my colors can be consistent across all my charts.
I've searched through the github repo and the docs (e.g. https://www.chartjs.org/docs/latest/general/colors.html) but cannot find a thing. Does anyone know where they are defined?
The colors are defined by Chartkick rather than Chart.js. Source
let defaultColors = [
"#3366CC", "#DC3912", "#FF9900", "#109618", "#990099", "#3B3EAC", "#0099C6",
"#DD4477", "#66AA00", "#B82E2E", "#316395", "#994499", "#22AA99", "#AAAA11",
"#6633CC", "#E67300", "#8B0707", "#329262", "#5574A6", "#651067"
];