/// /// Parses a hex value into an RGB /// /// /// public static Color ParseColor(string value) { value = value.Replace("#", ""); Int32 v = Int32.Parse(value, System.Globalization.NumberStyles.HexNumber); return new Color() { A = 255, R = Convert.ToByte((v >> 16) & 255), G = Convert.ToByte((v >> 8) & 255), B = Convert.ToByte((v >> 0) & 255) }; }