Closed mee-ironsoftware closed 1 year ago
return new Color(argb.ToString("X"));
should bereturn new Color(argb.ToString("X2"));
too?
Don't need X2
format for converting 32-bit ARGB into color code.
But found another bug on IronSoftware.Drawing.Color.FromArgb
with RGB code to 32-Bit ARGB, Alpha should be 0 instead of 255.
Eg.
Int32 iColorCode = Convert.ToInt32("1e81b0", 16);
// This will produce A=0, R=30, G=129, and B=176
System.Drawing.Color drawingColor = System.Drawing.Color.FromArgb(iColorCode);
// For IronDrawing should produce the same
// Before fixes this produce A=255, R=30, G=129, and B=176
IronSoftware.Drawing.Color ironColor = IronSoftware.Drawing.Color.FromArgb(iColorCode);
Some value will return 1 digit instead of 2.
Eg.