1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:43:21 +08:00

Merge pull request #1063 from peppy/from-hex-hash

Allow OsuColour.FromHex to support prefix #.
This commit is contained in:
Dan Balasescu 2017-07-27 18:52:04 +09:30 committed by GitHub
commit cb68f18f47

View File

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