From b64fe68233da2bfec7a2da925d74e61ab03185b2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 27 Jul 2017 18:03:24 +0900 Subject: [PATCH] Allow OsuColour.FromHex to support prefix #. Coincides with https://github.com/ppy/osu-web/pull/1373 --- osu.Game/Graphics/OsuColour.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index d2f4d4768c..70017d3c6e 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -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: