public static string GetColorAsString(Color color) { if (color == Color.Transparent) return ""; return string.Format("#{0:x2}{1:x2}{2:x2}", color.R, color.G, color.B); }
public override string GetCSS() { string result = ""; if (BackgroundBrush is SolidBrush) { var s = ExportToHTML.GetColorAsString((BackgroundBrush as SolidBrush).Color); if (s != "") { result += "background-color:" + s + ";"; } } return(result); }