---
name: "Gtk2::ColorSelection"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::ColorSelection"
---

# Gtk2::ColorSelection(3pm)

wrapper for GtkColorSelection

## NAME

Gtk2::ColorSelection - wrapper for GtkColorSelection

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Box
                           +----Gtk2::VBox
                                +----Gtk2::ColorSelection
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Orientable
```

## METHODS

### widget = Gtk2::ColorSelection-\>new

### unsigned = $colorsel-\>get\_current\_alpha

### $colorsel-\>set\_current\_alpha ($alpha)

- •

  `$alpha` (unsigned)

### color = $colorsel-\>get\_current\_color

### $colorsel-\>set\_current\_color ($color)

- •

  `$color` (Gtk2::Gdk::Color)

### boolean = $colorsel-\>get\_has\_opacity\_control

### $colorsel-\>set\_has\_opacity\_control ($has\_opacity)

- •

  `$has_opacity` (boolean)

### boolean = $colorsel-\>get\_has\_palette

### $colorsel-\>set\_has\_palette ($has\_palette)

- •

  `$has_palette` (boolean)

### boolean = $colorsel-\>is\_adjusting

### list = Gtk2::ColorSelection-\>palette\_from\_string ($string)

- •

  `$string` (string)

Returns a list of Gtk2::Gdk::color's.

### (string) = Gtk::ColorSelection-\>palette\_to\_string (...)

- •

  ... (list) of Gtk2::Gdk::Color's for the palette

Encodes a palette as a string, useful for persistent storage.

### unsigned = $colorsel-\>get\_previous\_alpha

### $colorsel-\>set\_previous\_alpha ($alpha)

- •

  `$alpha` (unsigned)

### color = $colorsel-\>get\_previous\_color

### $colorsel-\>set\_previous\_color ($color)

- •

  `$color` (Gtk2::Gdk::Color)

## PROPERTIES

- 'current-alpha' (Glib::UInt : default 65535 : readable / writable / private)

  The current opacity value (0 fully transparent, 65535 fully opaque)

- 'current-color' (Gtk2::Gdk::Color : default undef : readable / writable / private)

  The current color

- 'has-opacity-control' (boolean : default false : readable / writable / private)

  Whether the color selector should allow setting opacity

- 'has-palette' (boolean : default false : readable / writable / private)

  Whether a palette should be used

## SIGNALS

- **color-changed** (Gtk2::ColorSelection)

  ## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Box, Gtk2::VBox

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
