1 #ifndef EL__UTIL_COLOR_H
2 #define EL__UTIL_COLOR_H
4 typedef uint32_t color_T
;
11 #define INIT_COLOR_PAIR(bg, fg) { bg, fg }
13 /** Decode the color string.
14 * The color string can either contain '@#FF0044' style declarations or
16 int decode_color(const unsigned char *str
, int slen
, color_T
*color
);
18 /** Returns a string containing the color info. If no 'English' name can be
19 * found the hex color (@#rrggbb) is returned in the given buffer. */
20 const unsigned char *get_color_string(color_T color
, unsigned char hexcolor
[8]);
22 /** Translate rgb color to string in @#rrggbb format.
23 * @a str should be a pointer to an 8 bytes memory space. */
24 void color_to_string(color_T color
, unsigned char str
[8]);
26 /** @name Fastfind lookup management.
28 void init_colors_lookup(void);
29 void free_colors_lookup(void);