Hi, oops, I accidentally hit the "Send" button :(
> Thus spoketh "守株待兔" <1248283...@qq.com> > unto us on Sun, 21 Aug 2011 13:57:21 +0800: > > > (triple, hexstr) = askcolor() As you have probably noticed the return value of askcolor() is something like: >>> askcolor() ((214, 215, 214), '#d6d7d6') where the second part is the original color string as returned by tk_chooseColor , the first part, the 3-tuple, was apparently brought to us by Frederik Lundh, who wrote the tkColorChooser module. The magic lines from tkColorChooser.py are: # to simplify application code, the color chooser returns # an RGB tuple together with the Tk color string r, g, b = widget.winfo_rgb(result) return (r/256, g/256, b/256), str(result) so you see, the triple is simply a tuple of (red, green, blue) color values, ranging from 0 - 255 . I hope this helps Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Only a fool fights in a burning house. -- Kank the Klingon, "Day of the Dove", stardate unknown _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss