1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:43:22 +08:00

Add comments about OverlayColourProvider vs OsuColour distinction

This commit is contained in:
Bartłomiej Dach 2022-02-20 20:40:08 +01:00
parent e20ae5b871
commit 2592f0900d
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 9 additions and 0 deletions

View File

@ -268,6 +268,11 @@ namespace osu.Game.Graphics
// Reference: https://www.figma.com/file/VIkXMYNPMtQem2RJg9k2iQ/Asset%2FColours?node-id=1838%3A3
// Note that the colours in this region are also defined in `OverlayColourProvider` as `Colour{0,1,2,3,4}`.
// The difference as to which should be used where comes down to context.
// If the colour in question is supposed to always match the view in which it is displayed theme-wise, use `OverlayColourProvider`.
// If the colour usage is special and in general differs from the surrounding view in choice of hue, use the `OsuColour` constants.
public readonly Color4 Pink0 = Color4Extensions.FromHex(@"ff99c7");
public readonly Color4 Pink1 = Color4Extensions.FromHex(@"ff66ab");
public readonly Color4 Pink2 = Color4Extensions.FromHex(@"eb4791");

View File

@ -25,6 +25,10 @@ namespace osu.Game.Overlays
this.colourScheme = colourScheme;
}
// Note that the following five colours are also defined in `OsuColour` as `{colourScheme}{0,1,2,3,4}`.
// The difference as to which should be used where comes down to context.
// If the colour in question is supposed to always match the view in which it is displayed theme-wise, use `OverlayColourProvider`.
// If the colour usage is special and in general differs from the surrounding view in choice of hue, use the `OsuColour` constants.
public Color4 Colour1 => getColour(1, 0.7f);
public Color4 Colour2 => getColour(0.8f, 0.6f);
public Color4 Colour3 => getColour(0.6f, 0.5f);