/** * One mascot, palette-swapped per country. `flagPrimary`/`flagSecondary` are * the true flag hex values (used for the small flag swatch / badges). * `accent`/`accentSoft` are OKLCH values tuned for legibility as a UI accent * on a dark background — several flag colors (navy, dark green, deep red) * are too dark/desaturated to use directly as an accent on dark UI, so they * are lightened here rather than algorithmically derived, same as the * manual-override policy described for the mascot palette. */ export interface CountryTheme { code: string // ISO 3166-1 alpha-2, or a region code like 'CA-QC' name: string flagPrimary: string flagSecondary: string accent: string // oklch(), CSS custom property value accentSoft: string // oklch() with alpha, for subtle backgrounds } const FALLBACK_ACCENT = 'oklch(0.77 0.118 84.8)' // LokiLab gold export const COUNTRIES: CountryTheme[] = [ { code: 'CA-QC', name: 'Québec', flagPrimary: '#1768C4', flagSecondary: '#183653', accent: 'oklch(0.62 0.16 255.5)', accentSoft: 'oklch(0.62 0.16 255.5 / 14%)', }, { code: 'FR', name: 'France', flagPrimary: '#0055A4', flagSecondary: '#EF4135', accent: 'oklch(0.63 0.19 28.6)', accentSoft: 'oklch(0.63 0.19 28.6 / 14%)', }, { code: 'US', name: 'États-Unis', flagPrimary: '#B22234', flagSecondary: '#3C3B6E', accent: 'oklch(0.6 0.17 20.7)', accentSoft: 'oklch(0.6 0.17 20.7 / 14%)', }, { code: 'ES', name: 'Espagne', flagPrimary: '#AA151B', flagSecondary: '#F1BF00', accent: 'oklch(0.76 0.16 89.6)', accentSoft: 'oklch(0.76 0.16 89.6 / 14%)', }, { code: 'PT', name: 'Portugal', flagPrimary: '#046A38', flagSecondary: '#DA020E', accent: 'oklch(0.63 0.14 153.6)', accentSoft: 'oklch(0.63 0.14 153.6 / 14%)', }, ] export function countryTheme(code: string): CountryTheme { return ( COUNTRIES.find((c) => c.code === code) ?? { code, name: code, flagPrimary: '#D7AE54', flagSecondary: '#242B36', accent: FALLBACK_ACCENT, accentSoft: 'oklch(0.77 0.118 84.8 / 14%)', } ) }