From 8dd72a9dc6651eda4b536024442e5dc0ff4db96f Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 12 Jul 2021 19:34:14 +0300 Subject: [PATCH] Add new difficulty rating colour method --- osu.Game/Graphics/OsuColour.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index c0bc8fdb76..7610f84eda 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -1,11 +1,13 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Extensions.Color4Extensions; using osu.Game.Beatmaps; using osu.Game.Overlays; using osu.Game.Rulesets.Scoring; using osu.Game.Scoring; +using osu.Game.Utils; using osuTK.Graphics; namespace osu.Game.Graphics @@ -40,6 +42,33 @@ namespace osu.Game.Graphics } } + public Color4 ForDifficultyRatingNew(DifficultyRating difficulty) + { + switch (difficulty) + { + case DifficultyRating.Easy: + return Color4Extensions.FromHex("4ebfff"); + + case DifficultyRating.Normal: + return Color4Extensions.FromHex("66ff91"); + + case DifficultyRating.Hard: + return Color4Extensions.FromHex("f7e75d"); + + case DifficultyRating.Insane: + return Color4Extensions.FromHex("ff7e68"); + + case DifficultyRating.Expert: + return Color4Extensions.FromHex("fe3c71"); + + case DifficultyRating.ExpertPlus: + return Color4Extensions.FromHex("6662dd"); + + default: + throw new ArgumentOutOfRangeException(nameof(difficulty)); + } + } + /// /// Retrieves the colour for a . ///