Closed imtrobin closed 3 years ago
Actually, System.Drawing.Color
already has an alpha property. We should just expand FromDrawingColor
to also include the alpha.
Instead of
return ColorHexString(color.R, color.G, color.B);
that would be
return ColorString(color.R, color.G, color.B, (double)color.A / byte.MaxValue);
That should work if I'm not mistaken. We could also consider adding a ColorHexString
function with alpha included and use that.
Feel free to open a PR for this.
Closed by ea4b914. Will be released in the next update.
Hi, can I suggest to add to ColorUtils
public static string FromDrawingColor (System.Drawing.Color color, float alpha) => ColorUtil.ColorString (color.R, color.G, color.B, alpha);