clibs
Tiny but handy utility libraries for C
Macros | Typedefs
term_color.h File Reference

Add colors, either foreground or background, on console environment. More...

Go to the source code of this file.

Macros

#define _TERM_COLOR_DEFINED
 
#define TERM_COLOR_RESET   "\e[0m"
 Reset console color.
 
#define TERM_COLOR_BLACK   "\e[0;30m"
 Regular black color in foreground.
 
#define TERM_COLOR_RED   "\e[0;31m"
 Regular red color in foreground.
 
#define TERM_COLOR_GREEN   "\e[0;32m"
 Regular green color in foreground.
 
#define TERM_COLOR_YELLOW   "\e[0;33m"
 Regular yellow color in foreground.
 
#define TERM_COLOR_BLUE   "\e[0;34m"
 Regular blue color in foreground.
 
#define TERM_COLOR_PURPLE   "\e[0;35m"
 Regular purple color in foreground.
 
#define TERM_COLOR_CYAN   "\e[0;36m"
 Regular cyan color in foreground.
 
#define TERM_COLOR_WHITE   "\e[0;37m"
 Regular white color in foreground.
 
#define TERM_BRIGHT_COLOR_BLACK   "\e[0;90m"
 Bright black color in foreground.
 
#define TERM_BRIGHT_COLOR_RED   "\e[0;91m"
 Bright red color in foreground.
 
#define TERM_BRIGHT_COLOR_GREEN   "\e[0;92m"
 Bright green color in foreground.
 
#define TERM_BRIGHT_COLOR_YELLOW   "\e[0;93m"
 Bright yellow color in foreground.
 
#define TERM_BRIGHT_COLOR_BLUE   "\e[0;94m"
 Bright blue color in foreground.
 
#define TERM_BRIGHT_COLOR_PURPLE   "\e[0;95m"
 Bright purple color in foreground.
 
#define TERM_BRIGHT_COLOR_CYAN   "\e[0;96m"
 Bright cyan color in foreground.
 
#define TERM_BRIGHT_COLOR_WHITE   "\e[0;97m"
 Bright white color in foreground.
 
#define TERM_BOLD_COLOR_BLACK   "\e[1;30m"
 Bold black color in foreground.
 
#define TERM_BOLD_COLOR_RED   "\e[1;31m"
 Bold red color in foreground.
 
#define TERM_BOLD_COLOR_GREEN   "\e[1;32m"
 Bold green color in foreground.
 
#define TERM_BOLD_COLOR_YELLOW   "\e[1;33m"
 Bold yellow color in foreground.
 
#define TERM_BOLD_COLOR_BLUE   "\e[1;34m"
 Bold blue color in foreground.
 
#define TERM_BOLD_COLOR_PURPLE   "\e[1;35m"
 Bold purple color in foreground.
 
#define TERM_BOLD_COLOR_CYAN   "\e[1;36m"
 Bold cyan color in foreground.
 
#define TERM_BOLD_COLOR_WHITE   "\e[1;37m"
 Bold white color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_BLACK   "\e[1;90m"
 Bold bright black color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_RED   "\e[1;91m"
 Bold bright red color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_GREEN   "\e[1;92m"
 Bold bright green color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_YELLOW   "\e[1;93m"
 Bold bright yellow color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_BLUE   "\e[1;94m"
 Bold bright blue color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_PURPLE   "\e[1;95m"
 Bold bright purple color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_CYAN   "\e[1;96m"
 Bold bright cyan color in foreground.
 
#define TERM_BOLD_BRIGHT_COLOR_WHITE   "\e[1;97m"
 Bold bright white color in foreground.
 
#define TERM_UNDERLINE_COLOR_BLACK   "\e[4;30m"
 Underline black color in foreground.
 
#define TERM_UNDERLINE_COLOR_RED   "\e[4;31m"
 Underline red color in foreground.
 
#define TERM_UNDERLINE_COLOR_GREEN   "\e[4;32m"
 Underline green color in foreground.
 
#define TERM_UNDERLINE_COLOR_YELLOW   "\e[4;33m"
 Underline yellow color in foreground.
 
#define TERM_UNDERLINE_COLOR_BLUE   "\e[4;34m"
 Underline blue color in foreground.
 
#define TERM_UNDERLINE_COLOR_PURPLE   "\e[4;35m"
 Underline purple color in foreground.
 
#define TERM_UNDERLINE_COLOR_CYAN   "\e[4;36m"
 Underline cyan color in foreground.
 
#define TERM_UNDERLINE_COLOR_WHITE   "\e[4;37m"
 Underline white color in foreground.
 
#define TERM_BACKGROUND_COLOR_BLACK   "\e[40m"
 Regular black color in background.
 
#define TERM_BACKGROUND_COLOR_RED   "\e[41m"
 Regular red color in background.
 
#define TERM_BACKGROUND_COLOR_GREEN   "\e[42m"
 Regular green color in background.
 
#define TERM_BACKGROUND_COLOR_YELLOW   "\e[43m"
 Regular yellow color in background.
 
#define TERM_BACKGROUND_COLOR_BLUE   "\e[44m"
 Regular blue color in background.
 
#define TERM_BACKGROUND_COLOR_PURPLE   "\e[45m"
 Regular purple color in background.
 
#define TERM_BACKGROUND_COLOR_CYAN   "\e[46m"
 Regular cyan color in background.
 
#define TERM_BACKGROUND_COLOR_WHITE   "\e[47m"
 Regular white color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_BLACK   "\e[100m"
 Bright black color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_RED   "\e[101m"
 Bright red color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_GREEN   "\e[102m"
 Bright green color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_YELLOW   "\e[103m"
 Bright yellow color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_BLUE   "\e[104m"
 Bright blue color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_PURPLE   "\e[105m"
 Bright purple color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_CYAN   "\e[106m"
 Bright cyan color in background.
 
#define TERM_BRIGHT_BACKGROUND_COLOR_WHITE   "\e[107m"
 Bright white color in background.
 

Typedefs

typedef const char * term_color_t
 Type of term color.
 

Detailed Description

Add colors, either foreground or background, on console environment.

Author
ByteBard

Windows is not supported.