Rename convert() to getColour()

This commit is contained in:
Andrei Zavatski 2020-01-26 12:42:23 +03:00
parent 750a4476d8
commit 8e470678c7
1 changed files with 21 additions and 21 deletions

View File

@ -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)