From d77d131661132816f49013a7d38f7216374b821d Mon Sep 17 00:00:00 2001 From: david Date: Sun, 11 Oct 2026 03:14:19 -0300 Subject: started colors, i have a things noted on the side that's not in the repo but i have most of the functions planned --- defs/all.h | 5 +++-- defs/colors.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 defs/colors.h (limited to 'defs') diff --git a/defs/all.h b/defs/all.h index 0f2f4d8..d7873a1 100644 --- a/defs/all.h +++ b/defs/all.h @@ -6,11 +6,12 @@ #include #include #include +#include #include "helper.h" -//COLORS.C -void Void(void); //function that does FUCKING NOTHING BECAUSE MY STUPID LSP THINK I'M NOT USING THIS FUCKING FILE AND GIVES ME A WARNINGGENROENIGGHUIOAGHUIHUIAUHIDFG +//COLORS.C +#include "colors.h" #endif 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 +#include + +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 -- cgit v1.3-2-g0d8e