-
Notifications
You must be signed in to change notification settings - Fork 0
/
color.h
66 lines (56 loc) · 1.83 KB
/
color.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef COLOR_H
#define COLOR_H
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
#define COLOR_BLUE 4
#define COLOR_MAGENTA 5
#define COLOR_CYAN 6
#define COLOR_WHITE 7
#define COLOR_FOREGROUND 30
#define COLOR_FOREGROUND_BLACK 30
#define COLOR_FOREGROUND_RED 31
#define COLOR_FOREGROUND_GREEN 32
#define COLOR_FOREGROUND_YELLOW 33
#define COLOR_FOREGROUND_BLUE 34
#define COLOR_FOREGROUND_MAGENTA 35
#define COLOR_FOREGROUND_CYAN 36
#define COLOR_FOREGROUND_WHITE 37
#define COLOR_FOREGROUND_BRIGHT 90
#define COLOR_FOREGROUND_BRIGHT_BLACK 90
#define COLOR_FOREGROUND_BRIGHT_RED 91
#define COLOR_FOREGROUND_BRIGHT_GREEN 92
#define COLOR_FOREGROUND_BRIGHT_YELLOW 93
#define COLOR_FOREGROUND_BRIGHT_BLUE 94
#define COLOR_FOREGROUND_BRIGHT_MAGENTA 95
#define COLOR_FOREGROUND_BRIGHT_CYAN 96
#define COLOR_FOREGROUND_BRIGHT_WHITE 97
#define COLOR_BACKGROUND 40
#define COLOR_BACKGROUND_BLACK 40
#define COLOR_BACKGROUND_RED 41
#define COLOR_BACKGROUND_GREEN 42
#define COLOR_BACKGROUND_YELLOW 43
#define COLOR_BACKGROUND_BLUE 44
#define COLOR_BACKGROUND_MAGENTA 45
#define COLOR_BACKGROUND_CYAN 46
#define COLOR_BACKGROUND_WHITE 47
#define COLOR_BACKGROUND_BRIGHT 100
#define COLOR_BACKGROUND_BRIGHT_BLACK 100
#define COLOR_BACKGROUND_BRIGHT_RED 101
#define COLOR_BACKGROUND_BRIGHT_GREEN 102
#define COLOR_BACKGROUND_BRIGHT_YELLOW 103
#define COLOR_BACKGROUND_BRIGHT_BLUE 104
#define COLOR_BACKGROUND_BRIGHT_MAGENTA 105
#define COLOR_BACKGROUND_BRIGHT_CYAN 106
#define COLOR_BACKGROUND_BRIGHT_WHITE 107
#define SGR_SEQ_START "\033["
#define SGR_SEQ_END "m"
#define SGR_FORMAT_SEQ_START "\033[%sm"
#define RESET_SEQ "\033[0m"
#define __COLOR_CODE(col) # col
#define COLOR_CODE(col) __COLOR_CODE(col)
#define COLOR_SEQ(col) "\033[" COLOR_CODE(col) "m"
#define BOLD_SEQ "\033[1m"
#define UNDERLINE_SEQ "\033[4m"
#endif /* COLOR_H */