public static string ConvertColor(Color color, IFormatProvider formatProvider) { return(KnownColors.TryGetColorName(color, out var colorName) ? colorName : color.ToString(formatProvider)); }