Spaces:
Running
Running
File size: 904 Bytes
31d3580 95e3d2a 31d3580 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | // Per-slot colors for the 10 player perspectives. Slot is stable across the
// match (player=0 is always the same person), so a slot-based palette gives
// each player a persistent visual identity even when sides switch at half.
//
// Palette is desaturated / earthier than a vivid Tailwind ramp — it borrows
// from CSGO HUD/comp tokens so 10 chips can sit next to each other without
// fighting the rest of the UI for attention.
export const PLAYER_COLORS = [
'#a73a3a', // 0 crimson
'#b4663b', // 1 rust
'#b29144', // 2 golden tan
'#7a8a40', // 3 olive
'#3f7878', // 4 teal
'#3f6796', // 5 dusk blue
'#6b5b95', // 6 dusty violet
'#9a5a7a', // 7 muted rose
'#638a64', // 8 sage
'#8c6f56' // 9 warm taupe
] as const;
export function playerColor(slot: number): string {
return PLAYER_COLORS[
((slot % PLAYER_COLORS.length) + PLAYER_COLORS.length) % PLAYER_COLORS.length
];
}
|