Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 1 | |
| 2 | :mod:`ColorPicker` --- Color selection dialog |
| 3 | ============================================= |
| 4 | |
| 5 | .. module:: ColorPicker |
| 6 | :platform: Mac |
| 7 | :synopsis: Interface to the standard color selection dialog. |
| 8 | .. moduleauthor:: Just van Rossum <just@letterror.com> |
| 9 | .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> |
| 10 | |
| 11 | |
| 12 | The :mod:`ColorPicker` module provides access to the standard color picker |
| 13 | dialog. |
| 14 | |
| 15 | |
| 16 | .. function:: GetColor(prompt, rgb) |
| 17 | |
| 18 | Show a standard color selection dialog and allow the user to select a color. |
| 19 | The user is given instruction by the *prompt* string, and the default color is |
| 20 | set to *rgb*. *rgb* must be a tuple giving the red, green, and blue components |
| 21 | of the color. :func:`GetColor` returns a tuple giving the user's selected color |
| 22 | and a flag indicating whether they accepted the selection of cancelled. |
| 23 | |