SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
ConsoleColor.hpp
Go to the documentation of this file.
1// Copyright (c) 2023 Sapphire's Suite. All Rights Reserved.
2
3#pragma once
4
5#ifndef SAPPHIRE_LOGGER_CONSOLE_COLOR_GUARD
6#define SAPPHIRE_LOGGER_CONSOLE_COLOR_GUARD
7
8#include <cstdint>
9
19namespace SA
20{
27 enum ConsoleColor : uint8_t
28 {
29 // 4 bits for foreground attributes.
30
31 // 3 bits for foreground color (text).
32
35
37 Red_FG = 1,
38
41
44
47
50
53
56
57
60
61
62 // 4 bits for background attributes.
63
64 // 3 bits for background color.
65
67 None_BG = 0 << 4,
68
70 Red_BG = 1 << 4,
71
73 Green_BG = 2 << 4,
74
76 Blue_BG = 3 << 4,
77
79 Cyan_BG = 4 << 4,
80
82 Magenta_BG = 5 << 4,
83
85 Yellow_BG = 6 << 4,
86
88 White_BG = 7 << 4,
89
90
92 Bright_BG = 8 << 4,
93
96 };
97
100
107}
108
111#endif // GUARD
void SetConsoleColor(ConsoleColor _cslColor)
Crossplatform implementation of set color in console.
ConsoleColor
Console Color enum.
Definition ConsoleColor.hpp:28
@ Red_FG
Red foreground.
Definition ConsoleColor.hpp:37
@ Bright_FG
1 bit for bright attribute.
Definition ConsoleColor.hpp:59
@ White_BG
White background.
Definition ConsoleColor.hpp:88
@ Cyan_BG
Cyan background.
Definition ConsoleColor.hpp:79
@ Yellow_FG
Yellow foreground.
Definition ConsoleColor.hpp:52
@ None_BG
Default background.
Definition ConsoleColor.hpp:67
@ Blue_BG
Blue background.
Definition ConsoleColor.hpp:76
@ Cyan_FG
Cyan foreground.
Definition ConsoleColor.hpp:46
@ Yellow_BG
Yellow background.
Definition ConsoleColor.hpp:85
@ Green_FG
Green foreground.
Definition ConsoleColor.hpp:40
@ Reset
Reset console color value.
Definition ConsoleColor.hpp:95
@ Bright_BG
1 bit for Bright attribute.
Definition ConsoleColor.hpp:92
@ Red_BG
Red background.
Definition ConsoleColor.hpp:70
@ Magenta_FG
Magenta foreground.
Definition ConsoleColor.hpp:49
@ None_FG
Default foreground.
Definition ConsoleColor.hpp:34
@ Blue_FG
Blue foreground.
Definition ConsoleColor.hpp:43
@ Magenta_BG
Magenta background.
Definition ConsoleColor.hpp:82
@ Black_FG
Black foreground.
Definition ConsoleColor.hpp:55
@ Green_BG
Green background.
Definition ConsoleColor.hpp:73