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

@@ -39,6 +39,7 @@ namespace OpenRA.Graphics
var (r, g, b) = original.ToLinear();
// Calculate the brightness (i.e HSV value) of the original colour
// This inlines the single line of Color.RgbToHsv() that we need
var value = Math.Max(Math.Max(r, g), b);
// Construct the new RGB color