const COLOR_SWATCHES: Array<{ pattern: string; color: string }> = [ { pattern: 'preto', color: '#171717' }, { pattern: 'branco', color: '#f8fafc' }, { pattern: 'bege', color: '#d7bf9a' }, { pattern: 'cafe', color: '#79553d' }, { pattern: 'perola', color: '#e7dfcf' }, { pattern: 'marinho', color: '#172554' }, { pattern: 'bordo', color: '#6b1226' }, { pattern: 'verde', color: '#166534' }, { pattern: 'rosa', color: '#f0a6bf' }, { pattern: 'cinza', color: '#8f8f8f' }, { pattern: 'vermelho', color: '#b91c1c' }, { pattern: 'grafite', color: '#3f3f46' }, { pattern: 'azul', color: '#2563eb' }, { pattern: 'marron', color: '#6b4f3b' }, { pattern: 'marrom', color: '#6b4f3b' } ]; const normalizeColorLabel = (label: string) => ( label.normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase() ); export const getProductColor = (label: string) => { const normalizedLabel = normalizeColorLabel(label); return COLOR_SWATCHES.find(item => normalizedLabel.includes(item.pattern))?.color || '#64748b'; };