2017-03-18 13:52:24 +05:30
|
|
|
#ifndef COLORS_H
|
|
|
|
#define COLORS_H
|
|
|
|
|
|
|
|
struct Rgb {
|
|
|
|
int r, g, b;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Hls {
|
|
|
|
int h;
|
|
|
|
float l, s;
|
|
|
|
};
|
|
|
|
|
|
|
|
void hsl2rgb(struct Rgb *, const struct Hls const *);
|
|
|
|
|
|
|
|
void rgb2hsl(struct Hls *, const struct Rgb const *);
|
|
|
|
|
2024-10-19 09:51:02 +05:30
|
|
|
static const char *decspan(const int);
|
2017-03-18 13:52:24 +05:30
|
|
|
|
2024-10-19 09:51:02 +05:30
|
|
|
static void hexspan(char *, int, const char *);
|
2017-03-18 13:52:24 +05:30
|
|
|
|
2024-10-19 09:51:02 +05:30
|
|
|
static void colorize_noalloc(char * const);
|
|
|
|
|
|
|
|
static void sanitize(char *);
|
2017-03-18 13:52:24 +05:30
|
|
|
|
|
|
|
void print_plname(const char*);
|
|
|
|
|
2024-10-19 09:51:02 +05:30
|
|
|
static char* append_to_str(char *, const char *);
|
|
|
|
|
|
|
|
char* colorize_name(char *, char * const);
|
|
|
|
|
2017-03-18 13:52:24 +05:30
|
|
|
#endif
|