Colors

## Colors Colors — Managing and parsing colors |

## Functions

void | gnt_init_colors ()
void | gnt_uninit_colors ()
void | gnt_colors_parse ()
void | gnt_color_pairs_parse ()
int | gnt_colors_get_color ()
int | gnt_color_pair ()
int | gnt_color_add_pair ()

## Types and Values

enum | GntColorType

## Description

## Functions

### gnt_init_colors ()

    void
    gnt_init_colors (void);

Initialize the colors.

### gnt_uninit_colors ()

    void
    gnt_uninit_colors (void);

Uninitialize the colors.

### gnt_colors_parse ()

    void
    gnt_colors_parse (GKeyFile *kfile);

Parse color information from a file.

#### Parameters

kfile | The file containing color information. |

### gnt_color_pairs_parse ()

    void
    gnt_color_pairs_parse (GKeyFile *kfile);

Parse color-pair information from a file.

#### Parameters

kfile | The file containing the color-pair information. |

### gnt_colors_get_color ()

    int
    gnt_colors_get_color (char *key);

Parse a string color

#### Parameters

key | The string value |

#### Returns

A color. For an unknown color name, returns -EINVAL.

Since: 2.4.0

### gnt_color_pair ()

    int
    gnt_color_pair (int color);

Return the appropriate character attribute for a specified color. If the terminal doesn't have color support, this returns A_STANDOUT when deemed appropriate.

#### Parameters

color | The color code. |

#### Returns

A character attribute.

Since: 2.3.0

### gnt_color_add_pair ()

    int
    gnt_color_add_pair (int fg,
                        int bg);

Adds a color definition

#### Parameters

fg | Foreground |
bg | Background |

#### Returns

A color pair

Since: 2.4.0

## Types and Values

### enum GntColorType

Different classes of colors.

#### Members

GNT_COLOR_NORMAL |  |
GNT_COLOR_HIGHLIGHT |  |
GNT_COLOR_DISABLED |  |
GNT_COLOR_HIGHLIGHT_D |  |
GNT_COLOR_TEXT_NORMAL |  |
GNT_COLOR_TEXT_INACTIVE |  |
GNT_COLOR_MNEMONIC |  |
GNT_COLOR_MNEMONIC_D |  |
GNT_COLOR_SHADOW |  |
GNT_COLOR_TITLE |  |
GNT_COLOR_TITLE_D |  |
GNT_COLOR_URGENT |  |
GNT_COLORS |  |