C# .NET: Convert System.Drawing.Color to HTML color

Color c = System.Drawing.ColorTranslator.FromHtml(“#F5F7F8”);
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);

Comments are closed.