## Color Type Color Type |

## Synopsis

                        CoglColor;
    CoglColor *         cogl_color_new                      (void);
    CoglColor *         cogl_color_copy                     (const CoglColor *color);
    void                cogl_color_free                     (CoglColor *color);
    void                cogl_color_set_from_4ub             (CoglColor *dest,
                                                             guint8 red,
                                                             guint8 green,
                                                             guint8 blue,
                                                             guint8 alpha);
    void                cogl_color_set_from_4f              (CoglColor *dest,
                                                             float red,
                                                             float green,
                                                             float blue,
                                                             float alpha);

    float               cogl_color_get_red                  (const CoglColor *color);
    float               cogl_color_get_green                (const CoglColor *color);
    float               cogl_color_get_blue                 (const CoglColor *color);
    float               cogl_color_get_alpha                (const CoglColor *color);

    unsigned char       cogl_color_get_red_byte             (const CoglColor *color);
    unsigned char       cogl_color_get_green_byte           (const CoglColor *color);
    unsigned char       cogl_color_get_blue_byte            (const CoglColor *color);
    unsigned char       cogl_color_get_alpha_byte           (const CoglColor *color);

    float               cogl_color_get_red_float            (const CoglColor *color);
    float               cogl_color_get_green_float          (const CoglColor *color);
    float               cogl_color_get_blue_float           (const CoglColor *color);
    float               cogl_color_get_alpha_float          (const CoglColor *color);

## Description

## Details

### CoglColor

    typedef struct {
    } CoglColor;

A structure for holding a color definition. The contents of the CoglColor structure are private and should never by accessed directly.

Since 1.0

### cogl_color_new ()

    CoglColor *         cogl_color_new                      (void);

Returns : |

### cogl_color_copy ()

    CoglColor *         cogl_color_copy                     (const CoglColor *color);

`color` : |
Returns : |

### cogl_color_free ()

    void                cogl_color_free                     (CoglColor *color);

`color` : |

### cogl_color_set_from_4ub ()

    void                cogl_color_set_from_4ub             (CoglColor *dest,
                                                             guint8 red,
                                                             guint8 green,
                                                             guint8 blue,
                                                             guint8 alpha);

Sets the values of the passed channels into a CoglColor.

`dest` : | return location for a CoglColor
`red` : | value of the red channel, between 0 and 255
`green` : | value of the green channel, between 0 and 255
`blue` : | value of the blue channel, between 0 and 255
`alpha` : | value of the alpha channel, between 0 and 255

Since 1.0

### cogl_color_set_from_4f ()

    void                cogl_color_set_from_4f              (CoglColor *dest,
                                                             float red,
                                                             float green,
                                                             float blue,
                                                             float alpha);

Sets the values of the passed channels into a CoglColor

`dest` : | return location for a CoglColor
`red` : | value of the red channel, between 0 and `1`.0
`green` : | value of the green channel, between 0 and `1`.0
`blue` : | value of the blue channel, between 0 and `1`.0
`alpha` : | value of the alpha channel, between 0 and `1`.0

Since 1.0

### cogl_color_get_red ()

    float               cogl_color_get_red                  (const CoglColor *color);

Retrieves the red channel of `color` as a fixed point value between 0 and `1`.0.

`color` : | a CoglColor
Returns : | the red channel of the passed color

Since 1.0

### cogl_color_get_green ()

    float               cogl_color_get_green                (const CoglColor *color);

Retrieves the green channel of `color` as a fixed point value between 0 and `1`.0.

`color` : | a CoglColor
Returns : | the green channel of the passed color

Since 1.0

### cogl_color_get_blue ()

    float               cogl_color_get_blue                 (const CoglColor *color);

Retrieves the blue channel of `color` as a fixed point value between 0 and `1`.0.

`color` : | a CoglColor
Returns : | the blue channel of the passed color

Since 1.0

### cogl_color_get_alpha ()

    float               cogl_color_get_alpha                (const CoglColor *color);

Retrieves the alpha channel of `color` as a fixed point value between 0 and `1`.0.

`color` : | a CoglColor
Returns : | the alpha channel of the passed color

Since 1.0

### cogl_color_get_red_byte ()

    unsigned char       cogl_color_get_red_byte             (const CoglColor *color);

Retrieves the red channel of `color` as a byte value between 0 and 255

`color` : | a CoglColor
Returns : | the red channel of the passed color

Since 1.0

### cogl_color_get_green_byte ()

    unsigned char       cogl_color_get_green_byte           (const CoglColor *color);

Retrieves the green channel of `color` as a byte value between 0 and 255

`color` : | a CoglColor
Returns : | the green channel of the passed color

Since 1.0

### cogl_color_get_blue_byte ()

    unsigned char       cogl_color_get_blue_byte            (const CoglColor *color);

Retrieves the blue channel of `color` as a byte value between 0 and 255

`color` : | a CoglColor
Returns : | the blue channel of the passed color

Since 1.0

### cogl_color_get_alpha_byte ()

    unsigned char       cogl_color_get_alpha_byte           (const CoglColor *color);

Retrieves the alpha channel of `color` as a byte value between 0 and 255

`color` : | a CoglColor
Returns : | the alpha channel of the passed color

Since 1.0

### cogl_color_get_red_float ()

    float               cogl_color_get_red_float            (const CoglColor *color);

Retrieves the red channel of `color` as a floating point value between 0.0 and 1.0

`color` : | a CoglColor
Returns : | the red channel of the passed color

Since 1.0

### cogl_color_get_green_float ()

    float               cogl_color_get_green_float          (const CoglColor *color);

Retrieves the green channel of `color` as a floating point value between 0.0 and 1.0

`color` : | a CoglColor
Returns : | the green channel of the passed color

Since 1.0

### cogl_color_get_blue_float ()

    float               cogl_color_get_blue_float           (const CoglColor *color);

Retrieves the blue channel of `color` as a floating point value between 0.0 and 1.0

`color` : | a CoglColor
Returns : | the blue channel of the passed color

Since 1.0

### cogl_color_get_alpha_float ()

    float               cogl_color_get_alpha_float          (const CoglColor *color);

Retrieves the alpha channel of `color` as a floating point value between 0.0 and 1.0

`color` : | a CoglColor
Returns : | the alpha channel of the passed color

Since 1.0