From 59493e39b3bf8d1e43a7d272353d76a791bfe110 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Sun, 22 Dec 2024 10:54:14 -0500 Subject: [PATCH] Revert "Fix `SRGBColour` not clamping alpha on multiplication" This reverts commit 8a4abb37bc885a212f3e9bed220eca0955f3d4e4. --- osu.Framework/Graphics/Colour/SRGBColour.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Framework/Graphics/Colour/SRGBColour.cs b/osu.Framework/Graphics/Colour/SRGBColour.cs index 9b6aee1896..d5c994200e 100644 --- a/osu.Framework/Graphics/Colour/SRGBColour.cs +++ b/osu.Framework/Graphics/Colour/SRGBColour.cs @@ -123,7 +123,7 @@ public struct SRGBColour : IEquatable /// Multiplies the alpha value of this colour by the given alpha factor. /// /// The alpha factor to multiply with. - public void MultiplyAlpha(float alpha) => SRGB.A = Math.Min(1, SRGB.A * alpha); + public void MultiplyAlpha(float alpha) => SRGB.A *= alpha; private static bool isWhite(SRGBColour colour) => colour.SRGB.R == 1 && colour.SRGB.G == 1 && colour.SRGB.B == 1;