const MEMBER_COLORS = [ '#3f6f5a', '#8a5a2b', '#4f5f8f', '#8f4f5a', '#6a5a8f', '#2f6f6f', '#7a6a2f', '#5a6a3f', ] /** Maps a server-provided identity color to its design token. */ export function memberColorVar(color: string | null | undefined): string { if (color?.startsWith('var(')) return color const index = color ? MEMBER_COLORS.indexOf(color.toLowerCase()) : -1 return index >= 0 ? `var(--member-${index + 1})` : 'var(--muted)' }