To give your application's user a popup they can use to
select a color, import the tkColorChooser
module and call this function:
result
= tkColorChooser.askcolor(color
,option
=value
, ...)
Arguments are:
color
The initial color to be displayed. The default initial color is a light gray.
title=text
The specified
appears in the pop-up
window's title area. The default title is
“Color”.
text
parent=W
Make the popup appear over window
. The
default behavior is that it appears over your root
window.
W
If the user clicks the (
, where triple
, color
)
is a tuple triple
(
containing red, green, and blue values in the range
[0,255] respectively, and R
, G
, B
)
is the selected color as a
regular Tkinter color object.
color
If the users clicks (None, None)
.
Here's what the popup looks like on the author's system: