mirror of
https://github.com/ppy/osu.git
synced 2026-05-25 01:39:55 +08:00
Allow OsuColour.FromHex to support prefix #.
Coincides with https://github.com/ppy/osu-web/pull/1373
This commit is contained in:
@@ -13,6 +13,9 @@ namespace osu.Game.Graphics
|
||||
|
||||
public static Color4 FromHex(string hex)
|
||||
{
|
||||
if (hex[0] == '#')
|
||||
hex = hex.Substring(1);
|
||||
|
||||
switch (hex.Length)
|
||||
{
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user