ShowColorDialog() returns transparency 00 in Rhino 7

In Rhino 5 and 6 the following code returns the selected color with transparency = FF. However, in Rhino 7 it returns the color with transparency 00.
System.Drawing.Color new_color = new System.Drawing.Color();
bool picked = Rhino.UI.Dialogs.ShowColorDialog(ref new_color);
Is it intended, a bug, or am I getting anything wrong? I don’t see how I can set the transparency in the color picker.

Hi @jordi,

There are several versions of Dialog.ShowColorDialog. If you want to allows users to set the alpha value, then just use one of the versions that has an allowAlpha property.

In openNURBS color, alpha ranges from 0 to 255, with 0 = opaque, 255 = transparent.

With .NET (System.Drawing.Color), alpha ranges from 0 to 255, with 0 = transparent, 255 = opaque.

The color dialog in Rhino 5 and 6 is written in C++. So I’m assuming we didn’t convert the alpha value correctly. Rhino 7 should be correct.

– Dale

Thanks a lot, Dale.