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(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. str should be a pointer to
23 * a 8 bytes memory space. */
24 void color_to_string(color_T color
, unsigned char str
[8]);
26 /* Fastfind lookup management. */
27 void init_colors_lookup(void);
28 void free_colors_lookup(void);