blob: 0b7c1e6cf5a3e27a8baea810773e7d322dfd08a4 (
plain)
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
|
#pragma once
#include <string>
namespace crepe::util {
class LogColor {
public:
LogColor() = default;
public:
const char * c_str(const char * content = NULL);
const std::string str(const std::string & content = "");
public:
LogColor & reset();
public:
LogColor & fg_black(bool bright = false);
LogColor & fg_red(bool bright = false);
LogColor & fg_green(bool bright = false);
LogColor & fg_yellow(bool bright = false);
LogColor & fg_blue(bool bright = false);
LogColor & fg_magenta(bool bright = false);
LogColor & fg_cyan(bool bright = false);
LogColor & fg_white(bool bright = false);
public:
LogColor & bg_black(bool bright = false);
LogColor & bg_red(bool bright = false);
LogColor & bg_green(bool bright = false);
LogColor & bg_yellow(bool bright = false);
LogColor & bg_blue(bool bright = false);
LogColor & bg_magenta(bool bright = false);
LogColor & bg_cyan(bool bright = false);
LogColor & bg_white(bool bright = false);
private:
LogColor & add_code(unsigned int code);
private:
std::string code = "";
std::string final = "";
};
} // namespace crepe::util::color
|