Gtk.ColorChooserDialog¶
class — extends Dialog, Accessible, Buildable, ColorChooser, ConstraintTarget, Native, Root, ShortcutManager
:::warning Deprecated since 4.10 This API is deprecated. :::
A dialog for choosing a color.
<picture> <source srcset="colorchooser-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkColorChooserDialog" src="colorchooser.png"> </picture>
GtkColorChooserDialog implements the ColorChooser interface
and does not provide much API of its own.
To create a GtkColorChooserDialog, use ColorChooserDialog.new.
To change the initially selected color, use
ColorChooser.set_rgba. To get the selected color use
ColorChooser.get_rgba.
GtkColorChooserDialog has been deprecated in favor of ColorDialog.
CSS nodes¶
GtkColorChooserDialog has a single CSS node with the name window and style
class .colorchooser.
Constructors¶
new¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a new GtkColorChooserDialog.
Parameters:
title— Title of the dialogparent— Transient parent of the dialog
Properties¶
show_editor¶
Whether the color chooser dialog is showing the single-color editor.
It can be set to switch the color chooser into single-color editing mode.