tkinter.colorchooserColor choosing dialog颜色选择对话框

Source code: Lib/tkinter/colorchooser.py


The tkinter.colorchooser module provides the Chooser class as an interface to the native color picker dialog. tkinter.colorchooser模块提供Chooser类作为本机颜色选择器对话框的接口。Chooser implements a modal color choosing dialog window. 实现模式颜色选择对话框窗口。The Chooser class inherits from the Dialog class.Chooser类继承自Dialog类。

classtkinter.colorchooser.Chooser(master=None, **options)
tkinter.colorchooser.askcolor(color=None, **options)

Create a color choosing dialog. 创建颜色选择对话框。A call to this method will show the window, wait for the user to make a selection, and return the selected color (or None) to the caller.调用此方法将显示窗口,等待用户进行选择,并将所选颜色(或无)返回给调用者。

See also

Module tkinter.commondialog

Tkinter standard dialog moduleTkinter标准对话框模块