string转换成color转

string转换成color 

            string col = "#FF8400";
            this.BackColor = System.Drawing.ColorTranslator.FromHtml(col);

color转换成string

           Color mycolor = this.BackColor;
            string strcol = System.Drawing.ColorTranslator.ToHtml(mycolor);
            MessageBox.Show(strcol);

原文地址:https://www.cnblogs.com/mamiyiya777/p/5752355.html