/// <summary> /// Parses a web color string of form "#ffffff" /// </summary> /// <param name="webcolor"></param> /// <returns></returns> public static ColorRGB ParseWebColor(string webcolor) { var c = ColorRGB.TryParseWebColor(webcolor); if (!c.HasValue) { string s = $"Failed to parse color string \"{webcolor}\""; throw new AutomationException(s); } return(c.Value); }
public static ColorRGB ParseWebColor(string webcolor) { var c = ColorRGB.TryParseWebColor(webcolor); if (!c.HasValue) { string s = string.Format("Failed to parse color string \"{0}\"", webcolor); throw new System.FormatException(s); } return(c.Value); }