GtkColorSelection

GtkColorSelection — lets the user select colors visually or numerically.

Synopsis

class GtkColorSelection GtkVBox
{
    policy;             // GtkUpdateType : Read / Write 
    use_opacity;        // gboolean      : Read / Write 
}
     

Parent Classes

GtkObject<-- GtkWidget<-- GtkContainer<-- GtkBox<-- GtkVBox<--GtkColorSelection

Description

The .set_color method takes an array as its argument. The .get_color method returns a similar array. The elements of these arrays are:

rA percentage of red value, expressed as a decimal.
gA percentage of green value, expressed as a decimal.
bA percentage of blue value, expressed as a decimal.
opacityA percentage of opacity, expressed as a decimal.

For example, this call:

  csd.colorsel.set_color(array(.25,.9,.8,.85));

would set the color of the csd GtkColorSelectionDialog to pale turqoise-green (25% red, 90% green, 80% blue), with 85% opacity.

Methods

get_color (color)
set_color (color)
set_opacity (use_opacity)
set_update_policy (policy)

Related Functions

gtk_color_selection_dialog_get_type () -- replaces GTK_TYPE_COLOR_SELECTION_DIALOG
gtk_color_selection_dialog_new (title)
gtk_color_selection_get_type () -- replaces GTK_TYPE_COLOR_SELECTION
gtk_color_selection_new ()

Example

See the Color Selection example in the Example Code Appendix.