diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 9dd72ec..43ba4f2 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -43,12 +43,12 @@ namespace DS4Windows { byte alphacolor = Math.Max(red, Math.Max(green, blue)); Color reg = Color.FromArgb(red, green, blue); - Color full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg); + Color full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), ref reg); return Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full); } } - private Color HuetoRGB(float hue, float light, Color rgb) + private Color HuetoRGB(float hue, float light, ref Color rgb) { float L = (float)Math.Max(.5, light); float C = (1 - Math.Abs(2 * L - 1));