From d70055c38d1d59f897cc6bdc359f50befbf435cf Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 9 Mar 2019 22:27:40 +0000 Subject: [PATCH] Add int channel version of Color.FromAhsl. --- OpenRA.Game/Primitives/Color.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Game/Primitives/Color.cs b/OpenRA.Game/Primitives/Color.cs index 9f00b7917e..bb397f99de 100644 --- a/OpenRA.Game/Primitives/Color.cs +++ b/OpenRA.Game/Primitives/Color.cs @@ -59,6 +59,11 @@ namespace OpenRA.Primitives return FromArgb(alpha, (int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255)); } + public static Color FromAhsl(int h, int s, int l) + { + return FromAhsl(255, h / 255f, s / 255f, l / 255f); + } + public static Color FromAhsl(float h, float s, float l) { return FromAhsl(255, h, s, l);