---
name: "Gtk2::ColorButton"
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::ColorButton"
---

# Gtk2::ColorButton(3pm)

wrapper for GtkColorButton

## NAME

Gtk2::ColorButton - wrapper for GtkColorButton

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::Button
                                +----Gtk2::ColorButton
```

## INTERFACES

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

## METHODS

### widget = Gtk2::ColorButton-\>new ($color=undef)

- •

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

### widget = Gtk2::ColorButton-\>new\_with\_color ($color=undef)

- •

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

### unsigned = $color\_button-\>get\_alpha

### $color\_button-\>set\_alpha ($alpha)

- •

  `$alpha` (unsigned)

### color = $color\_button-\>get\_color

### $color\_button-\>set\_color ($color)

- •

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

### string = $color\_button-\>get\_title

### $color\_button-\>set\_title ($title)

- •

  `$title` (string)

### boolean = $color\_button-\>get\_use\_alpha

### $color\_button-\>set\_use\_alpha ($use\_alpha)

- •

  `$use_alpha` (boolean)

## PROPERTIES

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

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

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

  The selected color

- 'title' (string : default "Pick a Color" : readable / writable / private)

  The title of the color selection dialog

- 'use-alpha' (boolean : default false : readable / writable / private)

  Whether or not to give the color an alpha value

## SIGNALS

- **color-set** (Gtk2::ColorButton)

  ## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button

## COPYRIGHT

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

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