public static Color ToColor(this string str) { try { return ColorTranslator.FromHtml(str); } catch (Exception) { return Color.Empty; } }