MCPcopy Index your code
hub / github.com/python/cpython / askcolor

Function askcolor

Lib/tkinter/colorchooser.py:68–79  ·  view source on GitHub ↗

Display dialog window for selection of a color. Convenience wrapper for the Chooser class. Displays the color chooser dialog with color as the initial value.

(color=None, **options)

Source from the content-addressed store, hash-verified

66# convenience stuff
67
68def askcolor(color=None, **options):
69 """Display dialog window for selection of a color.
70
71 Convenience wrapper for the Chooser class. Displays the color
72 chooser dialog with color as the initial value.
73 """
74
75 if color:
76 options = options.copy()
77 options["initialcolor"] = color
78
79 return Chooser(**options).show()
80
81
82# --------------------------------------------------------------------

Callers 1

colorchooser.pyFile · 0.85

Calls 3

ChooserClass · 0.85
copyMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…