Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

char const* caca_get_color_name ( enum caca_color  color  ) 

Translate a colour index into the colour's name.

This function translates a caca_color enum into a human-readable description string of the associated colour.

color The colour value.
A static string containing the colour's name.

Definition at line 241 of file caca.c.

    static char const *color_names[] =
        "light gray",
        "dark gray",
        "light blue",
        "light green",
        "light cyan",
        "light red",
        "light magenta",

    if(color < 0 || color > 15)
        return "unknown";

    return color_names[color];

Generated by  Doxygen 1.6.0   Back to index