mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-12 19:18:20 +00:00
dcd86cb873
The DDTeam colors were previously generated in HSL by taking the team index and multiplying it by 360/64° to calculate the hue, which results in team colors being evenly distributed over the entire color range like a rainbow. However, this causes colors of adjacent teams to be very similar and therefore hard to distinguish. Now, the hue is calculated by multiplying the team index with the golden angle (~137.50776°) and taking the modulo 360° of that. Due to the properties of the golden angle, this can generate never repeating sequences of unique colors where the adjacent colors are very distinct. Duplicate code is reduced by adding the `CGameClient::GetDDTeamColor` function. |
||
---|---|---|
.. | ||
android | ||
antibot | ||
base | ||
engine | ||
game | ||
macos | ||
masterping | ||
mastersrv | ||
rust-bridge | ||
steam | ||
test | ||
tools |