## GOColor GOColor |

## Functions

#define | GO_COLOR_CHANGE_A()
#define | GO_COLOR_CHANGE_B()
#define | GO_COLOR_CHANGE_G()
#define | GO_COLOR_CHANGE_R()
#define | GO_COLOR_DOUBLE_A()
#define | GO_COLOR_DOUBLE_B()
#define | GO_COLOR_DOUBLE_G()
#define | GO_COLOR_DOUBLE_R()
#define | GO_COLOR_FROM_GDK_RGBA()
#define | GO_COLOR_FROM_RGB()
#define | GO_COLOR_FROM_RGBA()
#define | GO_COLOR_GREY()
#define | GO_COLOR_INTERPOLATE()
#define | GO_COLOR_MONO_INTERPOLATE()
#define | GO_COLOR_TO_CAIRO()
#define | GO_COLOR_TO_RGB()
#define | GO_COLOR_TO_RGBA()
#define | GO_COLOR_UINT_A()
#define | GO_COLOR_UINT_B()
#define | GO_COLOR_UINT_G()
#define | GO_COLOR_UINT_R()
gchar * | go_color_as_str ()
GOColor | go_color_from_gdk_rgba ()
gboolean | go_color_from_str ()
GdkRGBA * | go_color_to_gdk_rgba ()
PangoAttribute * | go_color_to_pango ()

## Types and Values

typedef | GOColor
| GONamedColor
#define | GO_COLOR_BLACK
#define | GO_COLOR_BLUE
#define | GO_COLOR_CYAN
#define | GO_COLOR_GREEN
#define | GO_COLOR_RED
#define | GO_COLOR_VIOLET
#define | GO_COLOR_WHITE
#define | GO_COLOR_YELLOW

## Description

## Functions

### GO_COLOR_CHANGE_A()

    #define GO_COLOR_CHANGE_A(x, a) (((x)&(~0xff))|((a)&0xff))

### GO_COLOR_CHANGE_B()

    #define GO_COLOR_CHANGE_B(x, b) (((x)&(~(0xff<<8)))|(((b)&0xff)<<8))

### GO_COLOR_CHANGE_G()

    #define GO_COLOR_CHANGE_G(x, g) (((x)&(~(0xff<<16)))|(((g)&0xff)<<16))

### GO_COLOR_CHANGE_R()

    #define GO_COLOR_CHANGE_R(x, r) (((x)&(~(0xff<<24)))|(((r)&0xff)<<24))

### GO_COLOR_DOUBLE_A()

    #define GO_COLOR_DOUBLE_A(x) (GO_COLOR_UINT_A(x)/255.0)

### GO_COLOR_DOUBLE_B()

    #define GO_COLOR_DOUBLE_B(x) (GO_COLOR_UINT_B(x)/255.0)

### GO_COLOR_DOUBLE_G()

    #define GO_COLOR_DOUBLE_G(x) (GO_COLOR_UINT_G(x)/255.0)

### GO_COLOR_DOUBLE_R()

    #define GO_COLOR_DOUBLE_R(x) (GO_COLOR_UINT_R(x)/255.0)

### GO_COLOR_FROM_GDK_RGBA()

    #define GO_COLOR_FROM_GDK_RGBA(c) go_color_from_gdk_rgba (&(c), NULL)

### GO_COLOR_FROM_RGB()

    #define GO_COLOR_FROM_RGB(r,g,b) GO_COLOR_FROM_RGBA((r),(g),(b),0xff)

### GO_COLOR_FROM_RGBA()

    #define GO_COLOR_FROM_RGBA(r,g,b,a) ((((guint)((r)&0xff))<<24)|(((guint)((g)&0xff))<<16)|((guint)((b)&0xff)<<8)|(guint)((a)&0xff))

### GO_COLOR_GREY()

    #define GO_COLOR_GREY(x) GO_COLOR_FROM_RGB(x,x,x)

### GO_COLOR_INTERPOLATE()

    #define             GO_COLOR_INTERPOLATE(c1, c2, t)

### GO_COLOR_MONO_INTERPOLATE()

    #define GO_COLOR_MONO_INTERPOLATE(v1, v2, t) ((gint)go_rint((v2)*(t)+(v1)*(1-(t))))

### GO_COLOR_TO_CAIRO()

    #define GO_COLOR_TO_CAIRO(x) GO_COLOR_DOUBLE_R(x),GO_COLOR_DOUBLE_G(x),GO_COLOR_DOUBLE_B(x),GO_COLOR_DOUBLE_A(x)

### GO_COLOR_TO_RGB()

    #define             GO_COLOR_TO_RGB(u,r,g,b)

### GO_COLOR_TO_RGBA()

    #define             GO_COLOR_TO_RGBA(u,r,g,b,a)

### GO_COLOR_UINT_A()

    #define GO_COLOR_UINT_A(x) (((guint)(x))&0xff)

### GO_COLOR_UINT_B()

    #define GO_COLOR_UINT_B(x) ((((guint)(x))>>8)&0xff)

### GO_COLOR_UINT_G()

    #define GO_COLOR_UINT_G(x) ((((guint)(x))>>16)&0xff)

### GO_COLOR_UINT_R()

    #define GO_COLOR_UINT_R(x) (((guint)(x))>>24)

### go_color_as_str ()

    gchar *
    go_color_as_str (GOColor color);

#### Parameters

color | GOColor |

#### Returns

string representation of color.

[transfer full]

### go_color_from_gdk_rgba ()

    GOColor
    go_color_from_gdk_rgba (GdkRGBA const *rgbacolor,
                            GOColor *res);

#### Parameters

rgbacolor | GdkRGBA to convert |
res | resulting color. | [out][optional]

#### Returns

resulting color

### go_color_from_str ()

    gboolean
    go_color_from_str (char const *str,
                       GOColor *res);

#### Parameters

str | String to parse |
res | the parsed color. | [out]

#### Returns

`TRUE` if `str` can be parsed as a color of the form R:G:B:A and the result is stored in `res` .

### go_color_to_gdk_rgba ()

    GdkRGBA *
    go_color_to_gdk_rgba (GOColor color,
                          GdkRGBA *res);

#### Parameters

color | GOColor |
res | `GdkRGBA` to change |

#### Returns

`res` .

[transfer none]

### go_color_to_pango ()

    PangoAttribute *
    go_color_to_pango (GOColor color,
                       gboolean is_fore);

[skip]

#### Parameters

color | GOColor |
is_fore | `TRUE` for foreground, `FALSE` for background |

#### Returns

the newly created PangoAttribute.

[transfer full]

## Types and Values

### GOColor

    typedef guint32					GOColor;

### GONamedColor

    typedef struct {
    	GOColor color;
    	char const *name;
    } GONamedColor;

#### Members

GOColor `color`; | the color. |
char const *`name`; | untranslated name - eg. "white". |

### GO_COLOR_BLACK

    #define GO_COLOR_BLACK   GO_COLOR_FROM_RGB(0x00, 0x00, 0x00)

### GO_COLOR_BLUE

    #define GO_COLOR_BLUE   GO_COLOR_FROM_RGB(0x00, 0x00, 0xff)

### GO_COLOR_CYAN

    #define GO_COLOR_CYAN    GO_COLOR_FROM_RGB(0x00, 0xff, 0xff)

### GO_COLOR_GREEN

    #define GO_COLOR_GREEN   GO_COLOR_FROM_RGB(0x00, 0xff, 0x00)

### GO_COLOR_RED

    #define GO_COLOR_RED     GO_COLOR_FROM_RGB(0xff, 0x00, 0x00)

### GO_COLOR_VIOLET

    #define GO_COLOR_VIOLET  GO_COLOR_FROM_RGB(0xff, 0x00, 0xff)

### GO_COLOR_WHITE

    #define GO_COLOR_WHITE  GO_COLOR_FROM_RGB(0xff, 0xff, 0xff)

### GO_COLOR_YELLOW

    #define GO_COLOR_YELLOW  GO_COLOR_FROM_RGB(0xff, 0xff, 0x00)