string color = "Red";
Color c = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(color);
this.BackColor = c;
Color c = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(color);
this.BackColor = c;
{
// string strRGB = str;
// int r = int.Parse(strRGB.Substring(1,2),System.Globalization.NumberStyles.AllowHexSpecifier);
// int g = int.Parse(strRGB.Substring(3,2),System.Globalization.NumberStyles.AllowHexSpecifier);
// int b = int.Parse(strRGB.Substring(5,2),System.Globalization.NumberStyles.AllowHexSpecifier);
// Color color = Color.FromArgb(r,g,b); Color c = System.Drawing.ColorTranslator.FromHtml(str);
return c;
}