From 8e470678c7d124fab495d4c15be304f598be87aa Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 26 Jan 2020 12:42:23 +0300 Subject: [PATCH] Rename convert() to getColour() --- osu.Game/Overlays/OverlayColourProvider.cs | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/osu.Game/Overlays/OverlayColourProvider.cs b/osu.Game/Overlays/OverlayColourProvider.cs index 1221de480e..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 => convert(1, 0.7f); - public Color4 Content1 => convert(0.4f, 1); - public Color4 Content2 => convert(0.4f, 0.9f); - public Color4 Light1 => convert(0.4f, 0.8f); - public Color4 Light2 => convert(0.4f, 0.75f); - public Color4 Light3 => convert(0.4f, 0.7f); - public Color4 Light4 => convert(0.4f, 0.5f); - public Color4 Dark1 => convert(0.2f, 0.35f); - public Color4 Dark2 => convert(0.2f, 0.3f); - public Color4 Dark3 => convert(0.2f, 0.25f); - public Color4 Dark4 => convert(0.2f, 0.2f); - public Color4 Dark5 => convert(0.2f, 0.15f); - public Color4 Dark6 => convert(0.2f, 0.1f); - public Color4 Foreground1 => convert(0.1f, 0.6f); - public Color4 Background1 => convert(0.1f, 0.4f); - public Color4 Background2 => convert(0.1f, 0.3f); - public Color4 Background3 => convert(0.1f, 0.25f); - public Color4 Background4 => convert(0.1f, 0.2f); - public Color4 Background5 => convert(0.1f, 0.15f); - public Color4 Background6 => convert(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); - private Color4 convert(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)