From 5231cfa1c71883a108e78c3e31e59ccd64e01b39 Mon Sep 17 00:00:00 2001 From: Michael Middlezong <119022671+mmiddlezong@users.noreply.github.com> Date: Fri, 6 Feb 2026 05:15:57 -0500 Subject: [PATCH] Change difficulty range slider colors to match star rating more closely (#36564) my attempt at #36452: changes difficulty range slider in song select V2 to use the new star difficulty text gradient colors from #36292. closes #36405 https://github.com/user-attachments/assets/134ace54-a8f8-4024-a32e-f1604c868232 to match star rating more closely for sr <= 7.5 (where i don't think the colors are so intense that they break harmony with the rest of the design), i removed the Lighten by 0.4f on color update also improved the transition from 7.9 to 8.0 which is quite abrupt in the current version https://github.com/ppy/osu/pull/33425#issuecomment-2951914385 is relevant here --- .../FilterControl.DifficultyRangeSlider.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/SelectV2/FilterControl.DifficultyRangeSlider.cs b/osu.Game/Screens/SelectV2/FilterControl.DifficultyRangeSlider.cs index f65c17bddf..f15cfa4b4d 100644 --- a/osu.Game/Screens/SelectV2/FilterControl.DifficultyRangeSlider.cs +++ b/osu.Game/Screens/SelectV2/FilterControl.DifficultyRangeSlider.cs @@ -12,6 +12,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Layout; using osu.Framework.Localisation; +using osu.Framework.Utils; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using osu.Game.Localisation; @@ -164,15 +165,20 @@ namespace osu.Game.Screens.SelectV2 protected override void UpdateDisplay(double value) { Colour4 nubColour = ColourUtils.SampleFromLinearGradient(spectrum, (float)Math.Round(value, 2, MidpointRounding.AwayFromZero)); - nubColour = nubColour.Lighten(0.4f); - if (value >= 8.0) + // Handle edge case colors for color harmony + if (value >= 7.5 && value < 8.0) + nubColour = Interpolation.ValueAt(value, nubColour, colours.Gray4, 7.5, 8.0); + else if (value >= 8.0) nubColour = colours.Gray4; Nub.AccentColour = nubColour; - Nub.GlowingAccentColour = nubColour.Lighten(0.2f); + Nub.GlowingAccentColour = nubColour.Lighten(0.1f); Nub.ShadowColour = Color4.Black.Opacity(0.2f); - NubText.Colour = OsuColour.ForegroundTextColourFor(nubColour); + NubText.Colour = colours.ForStarDifficultyText(value); + // Except for infinity, which should be white + if (Current.IsDefault && isUpper) + NubText.Colour = OsuColour.ForegroundTextColourFor(nubColour); base.UpdateDisplay(value); }