gtk.color_chooser

Module for [ColorChooser] interface

Types 2

interfaceColorChooser

[gtk.color_chooser.ColorChooser] is an interface that is implemented by widgets for choosing colors.

Depending on the situation, colors may be allowed to have alpha (translucency).

In GTK, the main widgets that implement this interface are [gtk.color_chooser_widget.ColorChooserWidget], [gtk.color_chooser_dialog.ColorChooserDialog] and [gtk.color_button.ColorButton].

Deprecated

Use [gtk.color_dialog.ColorDialog] and [gtk.color_dialog_button.ColorDialogButton]

instead of widgets implementing [gtk.color_chooser.ColorChooser]

Methods
gdk.rgba.RGBA rgba() @propertyGet `rgba` property. Returns: The currently selected color, as a [gdk.rgba.RGBA] struct.
void rgba(gdk.rgba.RGBA propval) @propertySet `rgba` property. Params: propval = The currently selected color, as a [gdk.rgba.RGBA] struct.
bool useAlpha() @propertyGet `useAlpha` property. Returns: Whether colors may have alpha (translucency).
void useAlpha(bool propval) @propertySet `useAlpha` property. Params: propval = Whether colors may have alpha (translucency).
void addPalette(gtk.types.Orientation orientation, int colorsPerLine, gdk.rgba.RGBA[] colors = null)Adds a palette to the color chooser.
void getRgba(out gdk.rgba.RGBA color)Gets the currently-selected color.
bool getUseAlpha()Returns whether the color chooser shows the alpha channel. Returns: true if the color chooser uses the alpha channel, false if not
void setRgba(gdk.rgba.RGBA color)Sets the color.
void setUseAlpha(bool useAlpha)Sets whether or not the color chooser should use the alpha channel.
gulong connectColorActivated(T)(T callback, Flag!"After" after = No.After)Connect to `ColorActivated` signal.
Methods
T rgba(gdk.rgba.RGBA propval)Set `rgba` property. Params: propval = The currently selected color, as a [gdk.rgba.RGBA] struct.
T useAlpha(bool propval)Set `useAlpha` property. Params: propval = Whether colors may have alpha (translucency).