Package: gtk

Class gtk-color-button


Documented Subclasses


Direct Slots

The "alpha" property of tpye :uint (Read / Write)
The selected opacity value (0 fully transparent, 65535 fully opaque).
Allowed values: <= 65535
Default value: 65535
Since 2.4
The "color" property of type gdk-color (Read / Write)
The selected color.
Warning: "color" has been deprecated since version 3.4 and should not be used in newly-written code. Use "rgba" instead.
Since 2.4
The "rgba" property of type gdk-rgba (Read / Write)
The RGBA color.
Since 3.0
The "title" property of type :string (Read / Write)
The title of the color selection dialog.
Default value: "Pick a Color"
Since 2.4
The "use-alpha" property of type :boolean (Read / Write)
If this property is set to true, the color swatch on the button is rendered against a checkerboard background to show its opacity and the opacity slider is displayed in the color selection dialog.
Default value: nil
Since 2.4


The gtk-color-button is a button which displays the currently selected color and allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog.

Signal Details

The "color-set" signal
 lambda (widget)   : Run First      
The "color-set" signal is emitted when the user selects a color. When handling this signal, use the gtk-color-button-get-color function and the gtk-color-button-get-alpha (or the gtk-color-button-get-rgba function) to find out which color was just selected. Note that this signal is only emitted when the user changes the color. If you need to react to programmatic color changes as well, use the "notify::color" signal.
The object which received the signal.
Since 2.4

Slot Access Functions

Inherited Slot Access Functions