Support multiple and custom levels

This commit is contained in:
Martin Prokoph
2025-01-15 17:42:28 +01:00
parent 2959d06db4
commit f5297dfb66
10 changed files with 127 additions and 14 deletions

16
src/color.hpp Normal file
View File

@@ -0,0 +1,16 @@
#include <iostream>
enum class Color {
RESET = 0,
BRIGHT_BLACK= 90,
BRIGHT_RED= 91,
BRIGHT_GREEN= 92,
BRIGHT_YELLOW= 93,
BRIGHT_BLUE= 94,
BRIGHT_MAGENTA= 95,
BRIGHT_CYAN= 96,
BRIGHT_WHITE= 97
};
std::ostream& operator<<(std::ostream& os, Color color) {
return os << "\033[" << static_cast<int>(color) << "m";
}