OscProb
colormod.h
Go to the documentation of this file.
1//#include <ostream>
2
3namespace Color {
4
5 enum Code {
6 FG_RED = 31,
7 FG_GREEN = 32,
8 FG_BLUE = 34,
10 BG_RED = 41,
12 BG_BLUE = 44,
13 BG_DEFAULT = 49
14 };
15
16 string Modifier(string s, Code code) {
17 return "\033[" + to_string(code) + "m" + s + "\033[0m";
18 }
19
20 static const string FAILED = Modifier("FAILED:", FG_RED);
21 static const string PASSED = Modifier("PASSED:", FG_GREEN);
22
23}
Definition: colormod.h:3
string Modifier(string s, Code code)
Definition: colormod.h:16
Code
Definition: colormod.h:5
@ BG_BLUE
Definition: colormod.h:12
@ BG_DEFAULT
Definition: colormod.h:13
@ FG_GREEN
Definition: colormod.h:7
@ BG_GREEN
Definition: colormod.h:11
@ FG_DEFAULT
Definition: colormod.h:9
@ FG_BLUE
Definition: colormod.h:8
@ BG_RED
Definition: colormod.h:10
@ FG_RED
Definition: colormod.h:6
static const string PASSED
Definition: colormod.h:21
static const string FAILED
Definition: colormod.h:20