diff options
Diffstat (limited to 'src/config/color.h')
-rw-r--r-- | src/config/color.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/config/color.h b/src/config/color.h index 247fffaf..6a5cf4a9 100644 --- a/src/config/color.h +++ b/src/config/color.h @@ -38,10 +38,20 @@ /* to access color names */ #define COLOR_NAME_SIZE 256 -extern const char *color_names[]; -/* to add or clear cache */ +#include <stdint.h> + +struct color_def { + uint16_t h; uint8_t s, l; + const char *name; +}; +extern const struct color_def color_names[]; + +/* hash string to color pair */ +int color_pair_cache_hash_str(const char *str); +/* parse fg_bg string to color pair */ int color_pair_cache_get(const char *pair_name); +/* clear cache */ void color_pair_cache_reset(void); #endif |