mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
Update colour spectrum inline with latest version
From https://github.com/ppy/osu-web/pull/7855#issuecomment-880959644, less arbitrary.
This commit is contained in:
parent
692e320ea5
commit
6fd97d67eb
@ -69,25 +69,18 @@ namespace osu.Game.Graphics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color4 ForStarDifficulty(double starDifficulty)
|
public Color4 ForStarDifficulty(double starDifficulty) => ColourUtils.SampleFromLinearGradient(new[]
|
||||||
{
|
{
|
||||||
var spectrumPoint = (float)(starDifficulty / 8.00);
|
(1.5f, Color4Extensions.FromHex("4fc0ff")),
|
||||||
|
(2.0f, Color4Extensions.FromHex("4fffd5")),
|
||||||
if (spectrumPoint > 1f)
|
(2.5f, Color4Extensions.FromHex("7cff4f")),
|
||||||
return Color4.Black;
|
(3.25f, Color4Extensions.FromHex("f6f05c")),
|
||||||
|
(4.5f, Color4Extensions.FromHex("ff8068")),
|
||||||
return ColourUtils.SampleFromLinearGradient(new[]
|
(6.0f, Color4Extensions.FromHex("ff3c71")),
|
||||||
{
|
(7.0f, Color4Extensions.FromHex("6563de")),
|
||||||
(0.2159f, Color4Extensions.FromHex("4fc0ff")),
|
(8.0f, Color4Extensions.FromHex("18158e")),
|
||||||
(0.2693f, Color4Extensions.FromHex("4fffd5")),
|
(8.0f, Color4.Black),
|
||||||
(0.3217f, Color4Extensions.FromHex("7cff4f")),
|
}, (float)starDifficulty);
|
||||||
(0.4111f, Color4Extensions.FromHex("f6f05c")),
|
|
||||||
(0.5767f, Color4Extensions.FromHex("ff8068")),
|
|
||||||
(0.7307f, Color4Extensions.FromHex("ff3c71")),
|
|
||||||
(0.8667f, Color4Extensions.FromHex("6563de")),
|
|
||||||
(0.9996f, Color4Extensions.FromHex("18158e")),
|
|
||||||
}, spectrumPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the colour for a <see cref="ScoreRank"/>.
|
/// Retrieves the colour for a <see cref="ScoreRank"/>.
|
||||||
|
Loading…
Reference in New Issue
Block a user