diff options
Diffstat (limited to 'lib/aec')
| -rw-r--r-- | lib/aec/aec.c | 17 | ||||
| -rw-r--r-- | lib/aec/aec.h | 14 |
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/aec/aec.c b/lib/aec/aec.c index d38e8d1..92a1f08 100644 --- a/lib/aec/aec.c +++ b/lib/aec/aec.c @@ -12,6 +12,23 @@ void sgr(const char *attrs) } +void foreground(const char *code) +{ + csi(); + wstd("3"); + wstd(code); + wstd("m"); +} + + +void background(const char *code) +{ + csi(); + wstd("4"); + wstd(code); + wstd("m"); +} + #ifdef AEC_UNIT_TEST int main() { diff --git a/lib/aec/aec.h b/lib/aec/aec.h index f304175..70c2706 100644 --- a/lib/aec/aec.h +++ b/lib/aec/aec.h @@ -1,6 +1,8 @@ #ifndef AEC_H #define AEC_H +#include "../sys/sizes.h" + #define SGR_RESET "0" #define SGR_BOLD "1" #define SGR_FAINT "2" @@ -24,4 +26,16 @@ void sgr(const char *attrs); +#define COLOR_BLACK "0" +#define COLOR_RED "1" +#define COLOR_GREEN "2" +#define COLOR_YELLOW "3" +#define COLOR_BLUE "4" +#define COLOR_PINK "5" +#define COLOR_CYAN "6" +#define COLOR_WHITE "7" + +void foreground(const char *code); +void background(const char *code); + #endif |