Excuse me, how can I call this color selection tool, or if I want to call it in another software, or Rhino 6 or Rhino 5
Hi @Hershel, below python example works in Rhino 5, 6, 7 and 8 (windows):
import Rhino
import rhinoscriptsyntax as rs
import scriptcontext
import System
from System.Drawing import Color
def DoSomething():
rc, color = Rhino.UI.Dialogs.ShowColorDialog(Color.Red)
if rc == True:
print "Color: {}".format(color)
DoSomething()
_
c.
Can anyone tell me how to get the RGB values from this script?
I can get them in the print statement but I cannot seem to find a way to have them formatted into a string?
Cheers
DK
Hi @kiteboardshaper,
you can just get them from the color
variable as properties eg:
str_color = "{},{},{}".format(color.R, color.G, color.B)
print str_color
does this help ?
_
c.