using ColorDialog from eto forms, and noticed that the default doesn’t allow the configuration of the alpha channel, and it defaults to 0 (transperent)
it should default to 1.
Hi @victorlin,
This seems to work:
import Rhino
import System
def __PrintColor(a, r, g, b):
print("A:{0}, R:{1}, G:{2}, B:{3}".format(a, r, g, b))
color = System.Drawing.Color.AliceBlue
__PrintColor(color.A, color.R, color.G, color.B)
color4f = Rhino.Display.Color4f(color)
__PrintColor(color4f.A, color4f.R, color4f.G, color4f.B)
rc, color4f = Rhino.UI.Dialogs.ShowColorDialog(color4f, True)
if rc:
__PrintColor(color4f.A, color4f.R, color4f.G, color4f.B)
color = color4f.AsSystemColor()
__PrintColor(color.A, color.R, color.G, color.B)
Feel free to share code that isn’t working for you.
Thanks,
– Dale