diff options
| author | david <[email protected]> | 2026-10-11 03:14:19 -0300 |
|---|---|---|
| committer | david <[email protected]> | 2026-10-11 03:14:19 -0300 |
| commit | d77d131661132816f49013a7d38f7216374b821d (patch) | |
| tree | 3ff3e7debfb9a3dab6aafd8c0a378ed6621b4b83 /defs/colors.h | |
| parent | 0b9d62202ab3f7a1eb349b0e7c1667de0c022cfe (diff) | |
| download | mikusays-c-d77d131661132816f49013a7d38f7216374b821d.tar.gz mikusays-c-d77d131661132816f49013a7d38f7216374b821d.zip | |
started colors, i have a things noted on the side that's not in the repo but i have most of the functions planned
Diffstat (limited to 'defs/colors.h')
| -rw-r--r-- | defs/colors.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/defs/colors.h b/defs/colors.h new file mode 100644 index 0000000..0c376db --- /dev/null +++ b/defs/colors.h @@ -0,0 +1,50 @@ +#ifndef COLORS_H +#define COLORS_H + +#include <stdlib.h> +#include <stdbool.h> + +typedef enum color_mode { + MODE_NONE, + MODE_ANSI16, + MODE_ANSI256, + MODE_TRUECOLOR +}color_mode; + +typedef enum NamedColor { + Black, + Red, + Green, + Yellow, + Blue, + Magenta, + Cyan, + White, + BrightBlack, + BrightRed, + BrightGreen, + BrightYellow, + BrightBlue, + BrightMagenta, + BrightCyan, + BrightWhite, +}NamedColor; + +typedef struct{ + int red; + int green; + int blue; +}rgbcolor; + +typedef struct colorconfig { + enum color_mode mode; + bool has_solid_color; + rgbcolor solid_color; + bool rainbow_enabled; //flag + int saturation; //default 100 + int brightness; //default 50 + char **rainbow_cache; //array of rgb_color malloced + size_t rainbow_count; +}colorconfig; + +#endif |
