summaryrefslogtreecommitdiff
path: root/devdocs/python~3.12/library%2Ftkinter.colorchooser.html
blob: 472231f3b77519c3c5fe635807b9b9de7b2e3a2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 <span id="tkinter-colorchooser-color-choosing-dialog"></span><h1>tkinter.colorchooser — Color choosing dialog</h1> <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/tkinter/colorchooser.py">Lib/tkinter/colorchooser.py</a></p>  <p>The <a class="reference internal" href="#module-tkinter.colorchooser" title="tkinter.colorchooser: Color choosing dialog (Tk)"><code>tkinter.colorchooser</code></a> module provides the <a class="reference internal" href="#tkinter.colorchooser.Chooser" title="tkinter.colorchooser.Chooser"><code>Chooser</code></a> class as an interface to the native color picker dialog. <code>Chooser</code> implements a modal color choosing dialog window. The <code>Chooser</code> class inherits from the <a class="reference internal" href="dialog#tkinter.commondialog.Dialog" title="tkinter.commondialog.Dialog"><code>Dialog</code></a> class.</p> <dl class="py class"> <dt class="sig sig-object py" id="tkinter.colorchooser.Chooser">
<code>class tkinter.colorchooser.Chooser(master=None, **options)</code> </dt> <dd></dd>
</dl> <dl class="py function"> <dt class="sig sig-object py" id="tkinter.colorchooser.askcolor">
<code>tkinter.colorchooser.askcolor(color=None, **options)</code> </dt> <dd>
<p>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 <code>None</code>) to the caller.</p> </dd>
</dl> <div class="admonition seealso"> <p class="admonition-title">See also</p> <dl class="simple"> <dt>
<code>Module</code> <a class="reference internal" href="dialog#module-tkinter.commondialog" title="tkinter.commondialog: Tkinter base class for dialogs (Tk)"><code>tkinter.commondialog</code></a>
</dt>
<dd>
<p>Tkinter standard dialog module</p> </dd> </dl> </div> <div class="_attribution">
  <p class="_attribution-p">
    &copy; 2001&ndash;2023 Python Software Foundation<br>Licensed under the PSF License.<br>
    <a href="https://docs.python.org/3.12/library/tkinter.colorchooser.html" class="_attribution-link">https://docs.python.org/3.12/library/tkinter.colorchooser.html</a>
  </p>
</div>