Clutter.Color
Description: Reference for Clutter.Color

### Struct

# ClutterColor

#### Description [src]

    struct ClutterColor {
      guint8 red;
      guint8 green;
      guint8 blue;
      guint8 alpha;
    }

Color representation.

###### Structure members

`red` | Red component, between 0 and 255
`green` | Green component, between 0 and 255
`blue` | Blue component, between 0 and 255
`alpha` | Alpha component, between 0 and 255

#### Constructors

###### clutter_color_alloc

Allocates a new, transparent black `ClutterColor`.

Available since: 1.12

###### clutter_color_new

Creates a new `ClutterColor` with the given values.

Available since: 0.8

#### Functions

###### clutter_color_from_hls

Converts a color expressed in HLS (hue, luminance and saturation) values into a `ClutterColor`.

###### clutter_color_from_pixel

Converts `pixel` from the packed representation of a four 8 bit channel color to a `ClutterColor`.

###### clutter_color_from_string

Parses a string definition of a color, filling the `ClutterColor`.red, `ClutterColor`.green, `ClutterColor`.blue and `ClutterColor`.alpha fields of `color`.

Available since: 1.0

###### clutter_color_get_static

Retrieves a static color for the given `color` name.

Available since: 1.6

#### Instance methods

###### clutter_color_add

Adds `a` to `b` and saves the resulting color inside `result`.

###### clutter_color_copy

Makes a copy of the color structure. The result must be freed using clutter_color_free().

Available since: 0.2

###### clutter_color_darken

Darkens `color` by a fixed amount, and saves the changed color in `result`.

###### clutter_color_equal

Compares two `ClutterColor`s and checks if they are the same.

Available since: 0.2

###### clutter_color_free

Frees a color structure created with clutter_color_copy().

Available since: 0.2

###### clutter_color_hash

Converts a `ClutterColor` to a hash value.

Available since: 1.0

###### clutter_color_init

Initializes `color` with the given values.

Available since: 1.12

###### clutter_color_interpolate

Interpolates between `initial` and `final` `ClutterColor`s using `progress`.

Available since: 1.6

###### clutter_color_lighten

Lightens `color` by a fixed amount, and saves the changed color in `result`.

###### clutter_color_shade

Shades `color` by `factor` and saves the modified color into `result`.

###### clutter_color_subtract

Subtracts `b` from `a` and saves the resulting color inside `result`.

###### clutter_color_to_hls

Converts `color` to the HLS format.

###### clutter_color_to_pixel

Converts `color` into a packed 32 bit integer, containing all the four 8 bit channels used by `ClutterColor`.

###### clutter_color_to_string

Returns a textual specification of `color` in the hexadecimal form #rrggbbaa, where r, g, b and a are hexadecimal digits representing the red, green, blue and alpha components respectively.

Available since: 0.2