Is ColorTranslator.ToHtml correct ?
I was playing with colors with transparency when I had to use System.Drawing.ColorTranslator.ToHtml to translate the ARGB color into HTML string color representation. I discovered that the above method doesn't consider the alpha channel. Then, I created my own:
private string ToHtmlAlpha(System.Drawing.Color c)
{
return String.Concat("#",
c.A.ToString("X2", null),
c.R.ToString("X2", null),
c.G.ToString("X2", null),
c.B.ToString("X2", null));
}