
// note: fallback colors come from "category10" scheme
// https://vega.github.io/vega/docs/schemes/#category10
// todo: css variables
export const chart_data_colors = [
	'var(--theme-chart-data-0, #1f77b4)',
	'var(--theme-chart-data-1, #ff7f0e)',
	'var(--theme-chart-data-2, #2ca02c)',
	'var(--theme-chart-data-3, #d62728)',
	'var(--theme-chart-data-4, #9467bd)',
	'var(--theme-chart-data-5, #8c564b)',
	'var(--theme-chart-data-6, #e377c2)',
	'var(--theme-chart-data-7, #7f7f7f)',
	'var(--theme-chart-data-8, #bcbd22)',
	'var(--theme-chart-data-9, #17becf)',
];

export function* chart_data_color_generator() : Generator<string, never> {
	let next = 0;

	while (true) {
		yield chart_data_colors[next++];

		if (next >= chart_data_colors.length) {
			next = 0;
		}
	}
}
