cemu
载入中...
搜索中...
未找到
color.h
浏览该文件的文档.
1
13#ifndef COLOR_H
14#define COLOR_H
15
16#define ANSI_RESET "\x1b[0m"
17#define ANSI_BOLD "\x1b[1m"
18#define ANSI_DIM "\x1b[2m"
19#define ANSI_ITALIC "\x1b[3m"
20#define ANSI_UNDERLINE "\x1b[4m"
21#define ANSI_BLINK "\x1b[5m"
22#define ANSI_INVERT "\x1b[6m"
23#define ANSI_REVERSE "\x1b[7m"
24#define ANSI_HIDDEN "\x1b[8m"
25#define ANSI_STRIKETHROUGH "\x1b[9m"
26
27#define ANSI_BLACK "\x1b[30m"
28#define ANSI_RED "\x1b[31m"
29#define ANSI_GREEN "\x1b[32m"
30#define ANSI_YELLOW "\x1b[33m"
31#define ANSI_BLUE "\x1b[34m"
32#define ANSI_MAGENTA "\x1b[35m"
33#define ANSI_CYAN "\x1b[36m"
34#define ANSI_WHITE "\x1b[37m"
35#define ANSI_DEFAULT "\x1b[39m"
36
37#define ANSI_BRIGHT_BLACK "\x1b[90m"
38#define ANSI_BRIGHT_RED "\x1b[91m"
39#define ANSI_BRIGHT_GREEN "\x1b[92m"
40#define ANSI_BRIGHT_YELLOW "\x1b[93m"
41#define ANSI_BRIGHT_BLUE "\x1b[94m"
42#define ANSI_BRIGHT_MAGENTA "\x1b[95m"
43#define ANSI_BRIGHT_CYAN "\x1b[96m"
44#define ANSI_BRIGHT_WHITE "\x1b[97m"
45#define ANSI_BRIGHT_DEFAULT "\x1b[99m"
46
47#define ANSI_BG_BLACK "\x1b[40m"
48#define ANSI_BG_RED "\x1b[41m"
49#define ANSI_BG_GREEN "\x1b[42m"
50#define ANSI_BG_YELLOW "\x1b[43m"
51#define ANSI_BG_BLUE "\x1b[44m"
52#define ANSI_BG_MAGENTA "\x1b[45m"
53#define ANSI_BG_CYAN "\x1b[46m"
54#define ANSI_BG_WHITE "\x1b[47m"
55#define ANSI_BG_DEFAULT "\x1b[49m"
56
57#define ANSI_FMT(msg, ...) ANSI_RESET __VA_ARGS__ msg ANSI_RESET
58
59#define _white(s) ANSI_FMT(s, ANSI_WHITE)
60#define _black(s) ANSI_FMT(s, ANSI_BLACK)
61#define _green(s) ANSI_FMT(s, ANSI_GREEN)
62#define _blue(s) ANSI_FMT(s, ANSI_BLUE)
63#define _yellow(s) ANSI_FMT(s, ANSI_YELLOW)
64#define _red(s) ANSI_FMT(s, ANSI_RED)
65#define _mag(s) ANSI_FMT(s, ANSI_MAGENTA)
66#define _bold(s) ANSI_FMT(s, ANSI_BOLD ANSI_WHITE)
67#define _ubold(s) ANSI_FMT(s, ANSI_UNDERLINE ANSI_BOLD ANSI_WHITE)
68#define _bred(s) ANSI_FMT(s, ANSI_BOLD ANSI_RED)
69#define _bgreen(s) ANSI_FMT(s, ANSI_BOLD ANSI_GREEN)
70#define _byellow(s) ANSI_FMT(s, ANSI_BOLD ANSI_YELLOW)
71#define _bblack(s) ANSI_FMT(s, ANSI_BOLD ANSI_BLACK)
72#define _bmag(s) ANSI_FMT(s, ANSI_BOLD ANSI_MAGENTA)
73#define _iblack(s) ANSI_FMT(s, ANSI_ITALIC ANSI_BLACK)
74#define _bblue(s) ANSI_FMT(s, ANSI_BRIGHT_BLUE)
75
76
77
78#endif /* COLOR_H */