Frees the resources allocated by cogl_color_new() and cogl_color_copy()
Retrieves the alpha channel of color
as a fixed point
value between 0 and 1.0.
Retrieves the alpha channel of color
as a byte value
between 0 and 255
Retrieves the alpha channel of color
as a floating point
value between 0.0 and 1.0
Retrieves the blue channel of color
as a fixed point
value between 0 and 1.0.
Retrieves the blue channel of color
as a byte value
between 0 and 255
Retrieves the blue channel of color
as a floating point
value between 0.0 and 1.0
Retrieves the green channel of color
as a fixed point
value between 0 and 1.0.
Retrieves the green channel of color
as a byte value
between 0 and 255
Retrieves the green channel of color
as a floating point
value between 0.0 and 1.0
Retrieves the red channel of color
as a fixed point
value between 0 and 1.0.
Retrieves the red channel of color
as a byte value
between 0 and 255
Retrieves the red channel of color
as a floating point
value between 0.0 and 1.0
Sets the values of the passed channels into a #CoglColor
value of the red channel, between 0 and 1.0
value of the green channel, between 0 and 1.0
value of the blue channel, between 0 and 1.0
value of the alpha channel, between 0 and 1.0
Sets the values of the passed channels into a #CoglColor
a pointer to an array of 4 float color components
Sets the values of the passed channels into a #CoglColor.
value of the red channel, between 0 and 255
value of the green channel, between 0 and 255
value of the blue channel, between 0 and 255
value of the alpha channel, between 0 and 255
Converts a non-premultiplied color to a pre-multiplied color. For example, semi-transparent red is (1.0, 0, 0, 0.5) when non-premultiplied and (0.5, 0, 0, 0.5) when premultiplied.
Sets the alpha channel of color
to alpha
.
a float value between 0.0f and 1.0f
Sets the alpha channel of color
to alpha
.
a byte value between 0 and 255
Sets the alpha channel of color
to alpha
.
a float value between 0.0f and 1.0f
Sets the blue channel of color
to blue
.
a float value between 0.0f and 1.0f
Sets the blue channel of color
to blue
.
a byte value between 0 and 255
Sets the blue channel of color
to blue
.
a float value between 0.0f and 1.0f
Sets the values of the passed channels into a #CoglColor
value of the red channel, between 0 and %1.0
value of the green channel, between 0 and %1.0
value of the blue channel, between 0 and %1.0
value of the alpha channel, between 0 and %1.0
Sets the values of the passed channels into a #CoglColor.
value of the red channel, between 0 and 255
value of the green channel, between 0 and 255
value of the blue channel, between 0 and 255
value of the alpha channel, between 0 and 255
Sets the green channel of color
to green
.
a float value between 0.0f and 1.0f
Sets the green channel of color
to green
.
a byte value between 0 and 255
Sets the green channel of color
to green
.
a float value between 0.0f and 1.0f
Sets the red channel of color
to red
.
a float value between 0.0f and 1.0f
Sets the red channel of color
to red
.
a byte value between 0 and 255
Sets the red channel of color
to red
.
a float value between 0.0f and 1.0f
Converts color
to the HLS format.
The hue
value is in the 0 .. 360 range. The luminance
and
saturation
values are in the 0 .. 1 range.
Converts a pre-multiplied color to a non-premultiplied color. For example, semi-transparent red is (0.5, 0, 0, 0.5) when premultiplied and (1.0, 0, 0, 0.5) when non-premultiplied.
Compares two #CoglColors and checks if they are the same.
This function can be passed to g_hash_table_new() as the key_equal_func
parameter, when using #CoglColors as keys in a #GHashTable.
a #CoglColor
a #CoglColor
A structure for holding a color definition. The contents of the CoglColor structure are private and should never by accessed directly.