Gtk2::HSV(3)
π Gtk2::HSV π
okay bestie, so this is Gtk2::HSV β the wrapper for GtkHSV, aka the little color wheel widget that lets your users pick a hue, saturation and value like they're on the set of a makeup tutorial. it lives in the User Contributed Perl Documentation section of your manual, and yes, it's giving "I know exactly what color I want and it's not beige." π¨β¨
π HIERARCHY π
the family tree, and honestly the ancestry is long, like a royal bloodline:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::HSV
so Gtk2::HSV is a Gtk2::Widget, which is a Gtk2::Object, which is a Glib::InitiallyUnowned, which is a Glib::Object. generations of slay. π
π¦ INTERFACES π¦
the vibes it also carries, on top of being itself:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::Buildable
β¨ METHODS β¨
widget = Gtk2::HSV->new
make a whole new HSV widget, fresh out the box, no notes. π
(h, s, v) = $hsv->get_color
hand over the current color as three values β hue, saturation, value. three besties, one color. π«Ά
$hsv->set_color ($h, $s, $v)
set the color, obviously. here's what you're feeding it:
$h(double)$s(double)$v(double)
(r, g, b) = Gtk2::hsv_to_rgb ($h, $s, $v)
glow-up time: convert hue/sat/value into red/green/blue. this one's a class method on the package, not a method on a widget, so call it like Gtk2::hsv_to_rgb(...). args:
$h(double)$s(double)$v(double)
boolean = $hsv->is_adjusting
is the widget mid-adjustment rn? true or false, no in-between. π
(size, ring_width) = $hsv->get_metrics
read out the widget's current measurements: how big it is and how thick the ring is. measuring tape out. π
$hsv->set_metrics ($size, $ring_width)
set those measurements yourself:
$size(integer)$ring_width(integer)
(h, s, v) = Gtk2::rgb_to_hsv ($r, $g, $b)
the reverse transformation, the uno reverse card π: red/green/blue go in, hue/sat/value come out. also a package-level function, so Gtk2::rgb_to_hsv(...). args:
$r(double)$g(double)$b(double)
π SIGNALS π
changed(Gtk2::HSV) β fires when the color changes. the main character notification.move(Gtk2::HSV,Gtk2::DirectionType) β fires on a directional move, and it hands you aGtk2::DirectionTypeso you know which way they went.
π ENUMS AND FLAGS π
enum Gtk2::DirectionType
six directions, all iconic, all here:
'tab-forward'/GTK_DIR_TAB_FORWARD'tab-backward'/GTK_DIR_TAB_BACKWARD'up'/GTK_DIR_UP'down'/GTK_DIR_DOWN'left'/GTK_DIR_LEFT'right'/GTK_DIR_RIGHT
π SEE ALSO π
go read these next, they're all connected, iykyk:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
and that's the whole page bestie!! this doc was generated by perl v5.42.0 on 2025-07-25 for Gtk2::HSV(3) β go pick a pretty color, you deserve it ππΈβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms