This is something I need very rarely. So rare in fact that in-between uses it is completely removed from my memory, leaving just the fact that I know I’ve searched for it before!
To convert a .NET Color object to an HTML RGB or named color, use
string colorAsString = ColorTranslator.ToHtml( _backgroundColor ) ;
Color c = ColorTranslator.FromHtml( @"#RRGGBB" ) ;
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖! For feedback, please ping me on Twitter.