We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9214de commit d3df7a8Copy full SHA for d3df7a8
ansiesc.h
@@ -34,21 +34,21 @@ void restoreConsole(void);
34
void getCursorPosition(int *row, int *col);
35
36
static inline void setTextColor(int code) {
37
- printf("\x1b[%dm", code);
+ printf("\x1b[3%dm", code);
38
}
39
40
static inline void setTextColorBright(int code) {
41
- printf("\x1b[%d;1m", code);
+ printf("\x1b[3%d;1m", code);
42
43
44
static inline void setBackgroundColor(int code) {
45
+ printf("\x1b[4%dm", code);
46
47
48
static inline void setBackgroundColorBright(int code) {
49
+ printf("\x1b[4%d;1m", code);
50
51
-
+
52
static inline void resetColor(void) {
53
printf("\x1b[%dm", RESET_COLOR);
54
0 commit comments