diff --git a/src/Overlay.NET/Directx/Direct2DRenderer.cs b/src/Overlay.NET/Directx/Direct2DRenderer.cs index 8f73826..156b9c2 100644 --- a/src/Overlay.NET/Directx/Direct2DRenderer.cs +++ b/src/Overlay.NET/Directx/Direct2DRenderer.cs @@ -194,7 +194,8 @@ namespace Overlay.NET.Directx { /// public int CreateBrush(int color) { _brushContainer.Add(new SolidColorBrush(_device, - new RawColor4((color >> 16) & 255L, (color >> 8) & 255L, (byte) color & 255L, (color >> 24) & 255L))); + new RawColor4(((color >> 16) & 255) / 255f, ((color >> 8) & 255) / 255f, (color & 255) / 255f, + ((color >> 24) & 255) / 255f))); return _brushContainer.Count - 1; } @@ -210,7 +211,7 @@ namespace Overlay.NET.Directx { color = Color.FromArgb(255, color); } - _brushContainer.Add(new SolidColorBrush(_device, new RawColor4(color.R, color.G, color.B, color.A / 255.0f))); + _brushContainer.Add(new SolidColorBrush(_device, new RawColor4(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f))); return _brushContainer.Count - 1; }