From ab7adb3a9798dd0c68cfd4dab5939c36918faf5a Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 12 Feb 2020 13:28:49 +0300 Subject: [PATCH] Adjust button colours --- .../Comments/CancellableCommentEditor.cs | 4 +- osu.Game/Overlays/Comments/CommentEditor.cs | 4 +- osu.Game/Overlays/OverlayColourProvider.cs | 42 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/osu.Game/Overlays/Comments/CancellableCommentEditor.cs b/osu.Game/Overlays/Comments/CancellableCommentEditor.cs index f58627efb3..c226b7f07f 100644 --- a/osu.Game/Overlays/Comments/CancellableCommentEditor.cs +++ b/osu.Game/Overlays/Comments/CancellableCommentEditor.cs @@ -63,8 +63,8 @@ public CancelButton() [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider) { - IdleColour = colourProvider.GetColour(0.5f, 0.45f); - HoverColour = colourProvider.GetColour(0.5f, 0.6f); + IdleColour = colourProvider.Light4; + HoverColour = colourProvider.Light3; } } } diff --git a/osu.Game/Overlays/Comments/CommentEditor.cs b/osu.Game/Overlays/Comments/CommentEditor.cs index 34aa036938..ac355e9c98 100644 --- a/osu.Game/Overlays/Comments/CommentEditor.cs +++ b/osu.Game/Overlays/Comments/CommentEditor.cs @@ -185,8 +185,8 @@ public CommitButton(string text) [BackgroundDependencyLoader] private void load() { - IdleColour = colourProvider.GetColour(0.5f, 0.45f); - HoverColour = colourProvider.GetColour(0.5f, 0.6f); + IdleColour = colourProvider.Light4; + HoverColour = colourProvider.Light3; } protected override void LoadComplete() diff --git a/osu.Game/Overlays/OverlayColourProvider.cs b/osu.Game/Overlays/OverlayColourProvider.cs index c0984073e6..9816f313ad 100644 --- a/osu.Game/Overlays/OverlayColourProvider.cs +++ b/osu.Game/Overlays/OverlayColourProvider.cs @@ -16,28 +16,28 @@ public OverlayColourProvider(OverlayColourScheme colourScheme) this.colourScheme = colourScheme; } - public Color4 Highlight1 => GetColour(1, 0.7f); - public Color4 Content1 => GetColour(0.4f, 1); - public Color4 Content2 => GetColour(0.4f, 0.9f); - public Color4 Light1 => GetColour(0.4f, 0.8f); - public Color4 Light2 => GetColour(0.4f, 0.75f); - public Color4 Light3 => GetColour(0.4f, 0.7f); - public Color4 Light4 => GetColour(0.4f, 0.5f); - public Color4 Dark1 => GetColour(0.2f, 0.35f); - public Color4 Dark2 => GetColour(0.2f, 0.3f); - public Color4 Dark3 => GetColour(0.2f, 0.25f); - public Color4 Dark4 => GetColour(0.2f, 0.2f); - public Color4 Dark5 => GetColour(0.2f, 0.15f); - public Color4 Dark6 => GetColour(0.2f, 0.1f); - public Color4 Foreground1 => GetColour(0.1f, 0.6f); - public Color4 Background1 => GetColour(0.1f, 0.4f); - public Color4 Background2 => GetColour(0.1f, 0.3f); - public Color4 Background3 => GetColour(0.1f, 0.25f); - public Color4 Background4 => GetColour(0.1f, 0.2f); - public Color4 Background5 => GetColour(0.1f, 0.15f); - public Color4 Background6 => GetColour(0.1f, 0.1f); + public Color4 Highlight1 => getColour(1, 0.7f); + public Color4 Content1 => getColour(0.4f, 1); + public Color4 Content2 => getColour(0.4f, 0.9f); + public Color4 Light1 => getColour(0.4f, 0.8f); + public Color4 Light2 => getColour(0.4f, 0.75f); + public Color4 Light3 => getColour(0.4f, 0.7f); + public Color4 Light4 => getColour(0.4f, 0.5f); + public Color4 Dark1 => getColour(0.2f, 0.35f); + public Color4 Dark2 => getColour(0.2f, 0.3f); + public Color4 Dark3 => getColour(0.2f, 0.25f); + public Color4 Dark4 => getColour(0.2f, 0.2f); + public Color4 Dark5 => getColour(0.2f, 0.15f); + public Color4 Dark6 => getColour(0.2f, 0.1f); + public Color4 Foreground1 => getColour(0.1f, 0.6f); + public Color4 Background1 => getColour(0.1f, 0.4f); + public Color4 Background2 => getColour(0.1f, 0.3f); + public Color4 Background3 => getColour(0.1f, 0.25f); + public Color4 Background4 => getColour(0.1f, 0.2f); + public Color4 Background5 => getColour(0.1f, 0.15f); + public Color4 Background6 => getColour(0.1f, 0.1f); - public Color4 GetColour(float saturation, float lightness) => Color4.FromHsl(new Vector4(getBaseHue(colourScheme), saturation, lightness, 1)); + private Color4 getColour(float saturation, float lightness) => Color4.FromHsl(new Vector4(getBaseHue(colourScheme), saturation, lightness, 1)); // See https://github.com/ppy/osu-web/blob/4218c288292d7c810b619075471eaea8bbb8f9d8/app/helpers.php#L1463 private static float getBaseHue(OverlayColourScheme colourScheme)