Gnome2:...orPicker(3)

πŸ“¦
version 1.048 Β· 2 versions
, in fedora 43

πŸ’– Gnome2::ColorPicker πŸ’–

okay bestie, welcome to the Gnome2::ColorPicker page β€” it's part of the User Contributed Perl Documentation, and it's literally just a wrapper for GnomeColorPicker 🎨✨ no cap.


🌈 HIERARCHY

so this is the family tree and yes, it's giving royalty. here's who our girl descends from, in order:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::Button
                              +----Gnome2::ColorPicker

like… six levels of ancestors. main character lineage fr fr πŸ‘‘


πŸ¦‹ INTERFACES

she also implements these, periodt:

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

✨ METHODS ✨

widget = Gnome2::ColorPicker->new

make a brand new color picker, fresh out the box πŸŽ€ that's it, that's the whole thing, no arguments, she's just born.

(r, g, b, a) = $cp->get_d

$cp->set_d ($r, $g, $b, $a)

the double-precision era πŸ’… getters and setters for the color as doubles. the args are:

  • $r (double) β€” red, but make it floating point
  • $g (double) β€” green, also floaty
  • $b (double) β€” blue, floaty too
  • $a (double) β€” alpha, the see-through-ness, floaty obviously

boolean = $cp->get_dither

$cp->set_dither ($dither)

do we dither the color or not? that's the question 🫢

  • $dither (boolean) β€” true or false, bestie, pick one

(r, g, b, a) = $cp->get_i16

$cp->set_i16 ($r, $g, $b, $a)

now we're in 16-bit integer territory, a whole different vibe 😌

  • $r (unsigned)
  • $g (unsigned)
  • $b (unsigned)
  • $a (unsigned)

all unsigned, all 16-bit, all iconic.

(r, g, b, a) = $cp->get_i8

$cp->set_i8 ($r, $g, $b, $a)

and the 8-bit version, the little one, the baby πŸ“

  • $r (unsigned)
  • $g (unsigned)
  • $b (unsigned)
  • $a (unsigned)

string = $cp->get_title

$cp->set_title ($title)

every picker deserves a name, honestly πŸ’œ

  • $title (string) β€” the text you want up in there

boolean = $cp->get_use_alpha

$cp->set_use_alpha ($use_alpha)

are we doing transparency today or not 🌸

  • $use_alpha (boolean) β€” turn that alpha channel on or off

πŸŽ€ PROPERTIES πŸŽ€

here's the property list, all of them, no skips, no cuts:

  • 'alpha' (Glib::UInt : default 0 : readable / writable) β€” the alpha value of the chosen color
  • 'blue' (Glib::UInt : default 0 : readable / writable) β€” the amount of blue in the chosen color
  • 'dither' (boolean : default true : readable / writable) β€” whether or not to dither to color
  • 'green' (Glib::UInt : default 0 : readable / writable) β€” the amount of green in the chosen color
  • 'red' (Glib::UInt : default 0 : readable / writable) β€” the amount of red in the chosen color
  • 'title' (string : default undef : readable / writable) β€” the title to give to the color picker
  • 'use-alpha' (boolean : default false : readable / writable) β€” whether or not to give the color an alpha value
not me listing all seven like a good student because of course I did 😭

πŸ”₯ SIGNALS πŸ”₯

one signal, and she's the moment:

color-set (Gnome2::ColorPicker, Glib::UInt, Glib::UInt, Glib::UInt,
Glib::UInt)

πŸ‘€ SEE ALSO

go read these too, they're the extended universe:

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


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

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


and that's a wrap, bestie 🫢 this was perl v5.42.0, dated 2025-07-25 β€” go forth and pick colors, you absolute legend πŸ’…βœ¨

πŸ“¦ where this page comes from