Skip to content

Commit

Permalink
Revert "Fix SRGBColour not clamping alpha on multiplication"
Browse files Browse the repository at this point in the history
This reverts commit 8a4abb3.
  • Loading branch information
frenzibyte committed Dec 22, 2024
1 parent ccd0269 commit 59493e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osu.Framework/Graphics/Colour/SRGBColour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public struct SRGBColour : IEquatable<SRGBColour>
/// Multiplies the alpha value of this colour by the given alpha factor.
/// </summary>
/// <param name="alpha">The alpha factor to multiply with.</param>
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;

Expand Down

0 comments on commit 59493e3

Please sign in to comment.