Home | History | Annotate | Download | only in lib-tk

Lines Matching refs:color

3 # this module provides an interface to the native color dialogue
15 # (given as an RGB triplet or a Tk color string)
26 # color chooser class
29 "Ask for a color"
35 # make sure initialcolor is a tk color string
36 color = self.options["initialcolor"]
37 if isinstance(color, tuple):
39 self.options["initialcolor"] = "#%02x%02x%02x" % color
49 # to simplify application code, the color chooser returns
50 # an RGB tuple together with the Tk color string
58 def askcolor(color = None, **options):
59 "Ask for a color"
61 if color:
63 options["initialcolor"] = color
72 print "color", askcolor()