/Doc/library/colorpicker.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 28 lines · 18 code · 10 blank · 0 comment · 0 complexity · b975f4921b171ac4f71c19f8078617da MD5 · raw file

  1. :mod:`ColorPicker` --- Color selection dialog
  2. =============================================
  3. .. module:: ColorPicker
  4. :platform: Mac
  5. :synopsis: Interface to the standard color selection dialog.
  6. :deprecated:
  7. .. moduleauthor:: Just van Rossum <just@letterror.com>
  8. .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
  9. The :mod:`ColorPicker` module provides access to the standard color picker
  10. dialog.
  11. .. note::
  12. This module has been removed in Python 3.x.
  13. .. function:: GetColor(prompt, rgb)
  14. Show a standard color selection dialog and allow the user to select a color.
  15. The user is given instruction by the *prompt* string, and the default color is
  16. set to *rgb*. *rgb* must be a tuple giving the red, green, and blue components
  17. of the color. :func:`GetColor` returns a tuple giving the user's selected color
  18. and a flag indicating whether they accepted the selection of cancelled.