/// <summary> /// returns HTML-ized color strings /// </summary> private string HtmlColor(System.Drawing.Color color) { if (color.IsEmpty) return ""; if (color.IsNamedColor) { return color.ToKnownColor().ToString(); } if (color.IsSystemColor) { return color.ToString(); } return "#" + color.ToArgb().ToString("x").Substring(2); }
/// <summary> /// returns HTML-ized color strings /// </summary> private string HtmlColor(System.Drawing.Color color) { string functionReturnValue = null; if (color.IsEmpty) return ""; if (color.IsNamedColor) { return color.ToKnownColor().ToString(); } if (color.IsSystemColor) { return color.ToString(); } return "#" + color.ToArgb().ToString("x").Substring(2); return functionReturnValue; }