pyface.color_dialog module

The implementation of a dialog that allows the user to select a color.

pyface.color_dialog.get_color(parent, color, show_alpha=False)[source]

Convenience function that displays a color dialog.

Parameters
  • parent (toolkit control) – The parent toolkit control for the modal dialog.

  • color (Color or color description) – The initial Color object, rgb(a) tuple or a string holding a valid color description.

  • show_alpha (bool) – Whether or not to show alpha channel information.

Returns

color – The selected color, or None if the user made no selection.

Return type

Color or None