Color

A #GdkColor is used to describe a color, similar to the XColor struct used in the X11 drawing API.

More...

Constructors

this
this(GdkColor* gdkColor, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()
this(ubyte red, ubyte green, ubyte blue)
this(ushort red, ushort green, ushort blue)

Creates a new Color

Destructor

~this
~this()
Undocumented in source.

Members

Functions

copy
Color copy()

Makes a copy of a #GdkColor.

equal
bool equal(Color colorb)

Compares two colors.

free
void free()

Frees a #GdkColor created with gdk_color_copy().

getColorStruct
GdkColor* getColorStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

hash
uint hash()

A hash function suitable for using for a hash table that stores #GdkColors.

toString
string toString()

Returns a textual specification of @color in the hexadecimal form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits representing the red, green and blue components respectively.

Properties

blue
ushort blue [@property getter]
ushort blue [@property setter]

The blue component of the color

green
ushort green [@property getter]
ushort green [@property setter]

The green component of the color

pixel
uint pixel [@property getter]
uint pixel [@property setter]

For allocated colors, the pixel value used to draw this color on the screen. Not used anymore.

red
ushort red [@property getter]
ushort red [@property setter]

The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity

Static functions

getType
GType getType()
parse
bool parse(string spec, Color color)

Parses a textual specification of a color and fill in the @red, @green, and @blue fields of a #GdkColor.

Variables

gdkColor
GdkColor* gdkColor;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Detailed Description

Deprecated: Use #GdkRGBA

Meta