/** * One mascot, palette-swapped per country/region. Colors are derived from * each flag's dominant hues (primary = most saturated non-neutral color, * secondary = next), with manual overrides where the algorithmic pick would * clash as a 2-color UI (e.g. flags that are only red/white or green/white). */ export interface CountryTheme { code: string // ISO 3166-1 alpha-2, or a region code like 'CA-QC' name: string flagEmoji: string primary: string secondary: string } const FALLBACK: Pick = { primary: '#D7AE54', // LokiLab gold — used when a flag has no usable non-neutral color secondary: '#242B36', } export const COUNTRIES: CountryTheme[] = [ { code: 'CA-QC', name: 'Québec', flagEmoji: '⚜️', primary: '#1768C4', secondary: '#183653' }, { code: 'CA', name: 'Canada', flagEmoji: '🇨🇦', primary: '#D52B1E', secondary: '#FFFFFF' }, { code: 'FR', name: 'France', flagEmoji: '🇫🇷', primary: '#0055A4', secondary: '#EF4135' }, { code: 'US', name: 'United States', flagEmoji: '🇺🇸', primary: '#B22234', secondary: '#3C3B6E' }, { code: 'ES', name: 'España', flagEmoji: '🇪🇸', primary: '#AA151B', secondary: '#F1BF00' }, { code: 'IT', name: 'Italia', flagEmoji: '🇮🇹', primary: '#009246', secondary: '#CE2B37' }, { code: 'PT', name: 'Portugal', flagEmoji: '🇵🇹', primary: '#046A38', secondary: '#DA020E' }, { code: 'DZ', name: 'Algérie', flagEmoji: '🇩🇿', primary: '#006233', secondary: '#D21034' }, { code: 'MA', name: 'Maroc', flagEmoji: '🇲🇦', primary: '#C1272D', secondary: '#006233' }, ] export function countryTheme(code: string): CountryTheme { return COUNTRIES.find((c) => c.code === code) ?? { code, name: code, flagEmoji: '🏳️', ...FALLBACK } }