gtk.symbolic_color

Module for SymbolicColor class

Types 1

GtkSymbolicColor is a boxed type that represents a symbolic color. It is the result of parsing a color expression. To obtain the color represented by a GtkSymbolicColor, it has to be resolved with gtk.symbolic_color.SymbolicColor.resolve, which replaces all symbolic color references by the colors they refer to (in a given context) and evaluates mix, shade and other expressions, resulting in a #GdkRGBA value.

It is not normally necessary to deal directly with #GtkSymbolicColors, since they are mostly used behind the scenes by #GtkStyleContext and #GtkCssProvider.

#GtkSymbolicColor is deprecated. Symbolic colors are considered an implementation detail of GTK+.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
SymbolicColor self()Returns `this`, for use in `with` statements.
gtk.symbolic_color.SymbolicColor newAlpha(gtk.symbolic_color.SymbolicColor color, double factor)Creates a symbolic color by modifying the relative alpha value of color. A factor < 1.0 would resolve to a more transparent color, while > 1.0 would resolve to a more opaque color.
gtk.symbolic_color.SymbolicColor newLiteral(gdk.rgba.RGBA color)Creates a symbolic color pointing to a literal color.
gtk.symbolic_color.SymbolicColor newMix(gtk.symbolic_color.SymbolicColor color1, gtk.symbolic_color.SymbolicColor color2, double factor)Creates a symbolic color defined as a mix of another two colors. a mix factor of 0 would resolve to color1, while a factor of 1 would resolve to color2.
gtk.symbolic_color.SymbolicColor newName(string name)Creates a symbolic color pointing to an unresolved named color. See [gtk.style_context.StyleContext.lookupColor] and [gtk.style_properties.StyleProperties.lookupColor].
gtk.symbolic_color.SymbolicColor newShade(gtk.symbolic_color.SymbolicColor color, double factor)Creates a symbolic color defined as a shade of another color. A factor > 1.0 would resolve to a brighter color, while < 1.0 would resolve to a darker color.
gtk.symbolic_color.SymbolicColor newWin32(string themeClass, int id)Creates a symbolic color based on the current win32 theme.
bool resolve(gtk.style_properties.StyleProperties props, out gdk.rgba.RGBA resolvedColor)If color is resolvable, resolved_color will be filled in with the resolved color, and true will be returned. Generally, if color can’t be resolved, it is due to it being defined on top of a named...
string toString_()Converts the given color to a string representation. This is useful both for debugging and for serialization of strings. The format of the string may change between different versions of GTK, but i...
Constructors
this(void * ptr, Flag!"Take" take)