private static ConvertColor ( string color ) : string | ||
color | string | |
return | string |
private static string ConvertColor(string color)
{
if (!String.IsNullOrEmpty(color) && color.Substring(0, 1) == "#")
{
Color c = ColorTranslator.FromHtml(color);
return string.Format("rgb({0},{1},{2})", c.R, c.G, c.B);
}
else
return color;
}