I am working on a windows phone game, and I got stuck when I wanted to convert a HEX string into Color. On windows phone 8 silverlight it is not a problem but I cannot find a so
I made a method from the top answer here:
private Windows.UI.Color GetColorFromHex(string hexString)
{
hexString = hexString.Replace("#", string.Empty);
byte r = byte.Parse(hexString.Substring(0, 2), NumberStyles.HexNumber);
byte g = byte.Parse(hexString.Substring(2, 2), NumberStyles.HexNumber);
byte b = byte.Parse(hexString.Substring(4, 2), NumberStyles.HexNumber);
return Windows.UI.Color.FromArgb(byte.Parse("1"), r, g, b);
}