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) public static Color4 FromHex(string hex)
{ {
if (hex[0] == '#')
hex = hex.Substring(1);
switch (hex.Length) switch (hex.Length)
{ {
default: default: