# `tkinter.colorchooser` --- 颜色选择对话框

源代码: Lib/tkinter/colorchooser.py

The `tkinter.colorchooser` module provides the `Chooser` class as an interface to the native color picker dialog. `Chooser` implements a modal color choosing dialog window. The `Chooser` class inherits from the `Dialog` class.

class tkinter.colorchooser.Chooser(master=None, **options)

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

  创建一个颜色选择对话框。 调用此方法将显示相应窗口，等待用户进行选择，并将选择的颜色 (或 `None`) 返回给调用者。

参见

模块 `tkinter.commondialog`

  Tkinter 标准对话框模块