Restrict player color choices to the hue-saturation plane.

This commit is contained in:
Paul Chote
2021-04-10 22:29:41 +01:00
committed by teinarss
parent 4042d5b179
commit 560f1a6466
15 changed files with 285 additions and 516 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Scripting.Global
var s = (byte)saturation.Clamp(0, 255);
var l = (byte)luminosity.Clamp(0, 255);
return Color.FromAhsl(h, s, l);
return Color.FromAhsl(255, h / 255f, s / 255f, l / 255f);
}
[Desc("Create a new color with the specified red/green/blue/[alpha] values.")]