wassemgtk's picture
Add slide renderer source for one-click deployment
0eaa85f verified
Raw
History Blame Contribute Delete
760 Bytes
export type Theme = {
background?: string;
surface?: string;
primary?: string;
secondary?: string;
accent?: string;
text_dark?: string;
text_light?: string;
data_series?: string[];
};
export function normalizeTheme(theme: Theme): Required<Theme> {
return {
background: theme.background ?? "F5F1E8",
surface: theme.surface ?? "FFFFFF",
primary: theme.primary ?? "16324F",
secondary: theme.secondary ?? "587B7F",
accent: theme.accent ?? "E07A5F",
text_dark: theme.text_dark ?? "182026",
text_light: theme.text_light ?? "FFFFFF",
data_series: theme.data_series ?? ["16324F", "E07A5F", "81B29A", "F2CC8F"]
};
}
export function cleanHex(value: string): string {
return value.replace("#", "").toUpperCase();
}