Basics
Guides
API Reference
Basics
Guides
API Reference
[30:7] extends: object
The PangoColor structure is used to represent a color in an uncalibrated
RGB color-space.
PangoColor (Handle = null)
Creates a new
Colorby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.copy ()
Creates a copy of @src. The copy should be freed with [method@Pango.Color.free]. Primarily used by language bindings, not that useful otherwise (since colors can just be copied by assignment in C).
the newly allocated PangoColor, which should be freed with [method@Pango.Color.free].free ()
Frees a color allocated by [method@Pango.Color.copy].
None.parse (string spec)
Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the CSS Color specification, or it can be a value in the form
#rgb,#rrggbb,#rrrgggbbbor#rrrrggggbbbb, wherer,gandbare hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is#fff,#ffffff,#fffffffffand#ffffffffffff.)
spec is a string specifying the new color.%TRUE if parsing of the specifier succeeded, otherwise %FALSE.parse_with_alpha (string spec)
Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the CSS Color specification, or it can be a hexadecimal value in the form
#rgb,#rrggbb,#rrrgggbbbor#rrrrggggbbbbwherer,gandbare hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is#fff,#ffffff,#fffffffffand#ffffffffffff.) Additionally, parse strings of the form#rgba,#rrggbbaa,#rrrrggggbbbbaaaa, if
is not %NULL, and set @alpha to the value specified by the hex digits for a. If no alpha component is found in @spec, @alpha is set to 0xffff (for a solid color).alpha is return location for alpha.spec is a string specifying the new color.%TRUE if parsing of the specifier succeeded, otherwise %FALSE.to_string ()
Returns a textual specification of @color. The string is in the hexadecimal form
#rrrrggggbbbb, wherer,gandbare hex digits representing the red, green, and blue components respectively.
a newly-allocated text string that must be freed with g_free()..[12:14] static extends: object
Generated struct layout helper for GIR record Color.
layout ()
Returns the Panama struct layout for
Color.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.