Remove HSLColor.

This commit is contained in:
Paul Chote
2018-12-31 08:41:23 +00:00
parent ab4a7e3558
commit 3e404f6ac2
76 changed files with 256 additions and 416 deletions

View File

@@ -256,8 +256,7 @@ namespace OpenRA.Widgets
public static Color GetContrastColor(Color fgColor, Color bgDark, Color bgLight)
{
var fg = new HSLColor(fgColor);
return fg.RGB == Color.White || fg.L > 80 ? bgDark : bgLight;
return fgColor == Color.White || fgColor.GetBrightness() > 0.33 ? bgDark : bgLight;
}
}