mirror of
https://github.com/ppy/osu
synced 2025-03-02 17:42:13 +00:00
Allow OsuColour.FromHex to support prefix #.
Coincides with https://github.com/ppy/osu-web/pull/1373
This commit is contained in:
parent
834793be43
commit
b64fe68233
@ -13,6 +13,9 @@ namespace osu.Game.Graphics
|
|||||||
|
|
||||||
public static Color4 FromHex(string hex)
|
public static Color4 FromHex(string hex)
|
||||||
{
|
{
|
||||||
|
if (hex[0] == '#')
|
||||||
|
hex = hex.Substring(1);
|
||||||
|
|
||||||
switch (hex.Length)
|
switch (hex.Length)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user