Skip to content

Commit f402d90

Browse files
authored
autocolors: color variation tweak (#4238)
1 parent 585de17 commit f402d90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

luarules/gadgets/game_autocolors.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,8 @@ else -- UNSYNCED
748748
totalEnemyDimmingCount = totalEnemyDimmingCount + count
749749
end
750750
end
751-
brightnessVariation = (0.7 - ((1.1 / numEnemies) * totalEnemyDimmingCount)) * 255
752-
maxColorVariation = math.floor(11 + (90 / (allyTeamCount)))
751+
brightnessVariation = (0.7 - ((1.2 / numEnemies) * totalEnemyDimmingCount)) * 255
752+
maxColorVariation = 100
753753
end
754754
local color = hex2RGB(ffaColors[allyTeamID+1] or '#333333')
755755
if teamID == gaiaTeamID then
@@ -779,8 +779,8 @@ else -- UNSYNCED
779779
elseif
780780
not teamColors[allyTeamCount] or not teamColors[allyTeamCount][1][#Spring.GetTeamList(allyTeamCount-1)] --or #Spring.GetTeamList() > 30
781781
then
782-
local brightnessVariation = (0.7 - ((1.1 / #Spring.GetTeamList(allyTeamID)) * dimmingCount[allyTeamID])) * 255
783-
local maxColorVariation = math.floor(11 + (90 / (allyTeamCount)))
782+
local brightnessVariation = (0.7 - ((1.05 / #Spring.GetTeamList(allyTeamID)) * dimmingCount[allyTeamID])) * 255
783+
local maxColorVariation = (120 / (allyTeamCount-1))
784784
local color = hex2RGB(ffaColors[allyTeamID+1] or '#333333')
785785
if teamID == gaiaTeamID then
786786
brightnessVariation = 0

0 commit comments

Comments
 (0)