:right-sidebar: True ColorChooserWidget =================================================================== .. currentmodule:: gi.repository.Gtk .. deprecated:: 4.10 Direct use of ``GtkColorChooserWidget`` is deprecated. .. class:: ColorChooserWidget(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ColorChooser`, :class:`~gi.repository.Gtk.ConstraintTarget` The ``GtkColorChooserWidget`` widget lets the user select a color. By default, the chooser presents a predefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor. To enter the single-color editing mode, use the context menu of any color of the palette, or use the '+' button to add a new custom color. The chooser automatically remembers the last selection, as well as custom colors. To create a ``GtkColorChooserWidget``\, use :obj:`~gi.repository.Gtk.ColorChooserWidget.new`\. To change the initially selected color, use :obj:`~gi.repository.Gtk.ColorChooser.set_rgba`\. To get the selected color use :obj:`~gi.repository.Gtk.ColorChooser.get_rgba`\. The ``GtkColorChooserWidget`` is used in the :obj:`~gi.repository.Gtk.ColorChooserDialog` to provide a dialog for selecting colors. Actions -------------------------------------------------------------------------------- ``GtkColorChooserWidget`` defines a set of built-in actions: - ``color.customize`` activates the color editor for the given color. - ``color.select`` emits the :obj:`~gi.repository.Gtk.ColorChooser.signals.color_activated` signal for the given color. CSS names -------------------------------------------------------------------------------- ``GtkColorChooserWidget`` has a single CSS node with name colorchooser. Constructors ------------ .. rst-class:: interim-class .. class:: ColorChooserWidget :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``GtkColorChooserWidget``\. Properties ---------- .. rst-class:: interim-class .. class:: ColorChooserWidget :no-index: .. attribute:: props.show_editor :type: bool The type of the None singleton.