15 lines
846 B
TypeScript
15 lines
846 B
TypeScript
import { Tema } from './indicadores.models';
|
|
|
|
// Matches src/styles.scss: interface tokens are the source of these candidates,
|
|
// not a certified brand guide. Published semantic colours always take priority.
|
|
export const C2_PALETTE = Object.freeze({
|
|
series: Object.freeze(['#7184A2', '#A4B88A', '#D0B778', '#B78B8E']),
|
|
states: Object.freeze({ null: '#8A9199', noData: '#C9CDD2', suppressed: '#4B4949' }),
|
|
claro: Object.freeze({ background: '#FFFFFF', text: '#081839', grid: '#E4E7E9', outline: '#BCC6D1' }),
|
|
oscuro: Object.freeze({ background: '#081839', text: '#FFFFFF', grid: '#53647F', outline: '#53647F' }),
|
|
});
|
|
export function c2Theme(tema: Tema) { return C2_PALETTE[tema]; }
|
|
export function c2Color(published: string | undefined, index: number): string {
|
|
return published ?? C2_PALETTE.series[index % C2_PALETTE.series.length];
|
|
}
|