Gtk.HSV

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.HSV Gtk.HSV Gtk.Widget->Gtk.HSV

Subclasses:

None

Methods

Inherited:

Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

class

to_rgb (h, s, v)

get_color ()

get_metrics ()

is_adjusting ()

set_color (h, s, v)

set_metrics (size, ring_width)

Virtual Methods

Inherited:

Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

do_changed ()

do_move (type)

Properties

Inherited:

Gtk.Widget (39)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Widget (69), GObject.Object (1)

Name

Short Description

changed

move

Fields

Inherited:

Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Widget

r

Class Details

class Gtk.HSV(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

Gtk.HSVClass

Gtk.HSV is the “color wheel” part of a complete color selector widget. It allows to select a color by determining its HSV components in an intuitive way. Moving the selection around the outer ring changes the hue, and moving the selection point inside the inner triangle changes value and saturation.

Gtk.HSV has been deprecated together with Gtk.ColorSelection, where it was used.

classmethod new()[source]
Returns:

A newly-created HSV color selector.

Return type:

Gtk.Widget

Creates a new HSV color selector.

New in version 2.14.

classmethod to_rgb(h, s, v)[source]
Parameters:
Returns:

r:

Return value for the red component

g:

Return value for the green component

b:

Return value for the blue component

Return type:

(r: float, g: float, b: float)

Converts a color from HSV space to RGB.

Input values must be in the [0.0, 1.0] range; output values will be in the same range.

New in version 2.14.

get_color()[source]
Returns:

h:

Return value for the hue

s:

Return value for the saturation

v:

Return value for the value

Return type:

(h: float, s: float, v: float)

Queries the current color in an HSV color selector. Returned values will be in the [0.0, 1.0] range.

New in version 2.14.

get_metrics()[source]
Returns:

size:

Return value for the diameter of the hue ring

ring_width:

Return value for the width of the hue ring

Return type:

(size: int, ring_width: int)

Queries the size and ring width of an HSV color selector.

New in version 2.14.

is_adjusting()[source]
Returns:

True if clients can ignore changes to the color value, since they may be transitory, or False if they should consider the color value status to be final.

Return type:

bool

An HSV color selector can be said to be adjusting if multiple rapid changes are being made to its value, for example, when the user is adjusting the value with the mouse. This function queries whether the HSV color selector is being adjusted or not.

New in version 2.14.

set_color(h, s, v)[source]
Parameters:

Sets the current color in an HSV color selector. Color component values must be in the [0.0, 1.0] range.

New in version 2.14.

set_metrics(size, ring_width)[source]
Parameters:
  • size (int) – Diameter for the hue ring

  • ring_width (int) – Width of the hue ring

Sets the size and ring width of an HSV color selector.

New in version 2.14.

do_changed() virtual
do_move(type) virtual
Parameters:

type (Gtk.DirectionType) –

Signal Details

Gtk.HSV.signals.changed(h_s_v)
Signal Name:

changed

Flags:

RUN_FIRST

Parameters:

h_s_v (Gtk.HSV) – The object which received the signal

Gtk.HSV.signals.move(h_s_v, object)
Signal Name:

move

Flags:

RUN_LAST, ACTION

Parameters: