mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 16:26:37 +00:00
1ef0cf28a1
## Summary Refactor `generateTeamColors()` to use LCH (Lightness-Chroma-Hue) color space instead of HSL for perceptually uniform team color variations. ## Changes - **`Colors.ts`**: Rewrite `generateTeamColors()` to use LCH color space - Golden angle hue distribution clamped to ±12° to preserve team identity - Chroma oscillates ±10% around the base to add variety without washing out - Lightness alternates ±18 around the base to keep teammates recognizable ## Why LCH? LCH is a perceptually uniform color space, meaning equal numeric differences correspond to equal perceived differences. This produces team color variations that look more consistent and distinguishable compared to HSL-based generation. ## Notes - The "skip ally attack confirmation" feature that was previously in this PR has been split into a separate PR as requested by @evanpelle.