NoTeX 1.0.0
A modern noteworthy LaTeX template
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <string_view>
14
27namespace ansi {
28
30constexpr std::string_view reset = "\033[0m";
31
38namespace text {
40constexpr std::string_view bold = "\033[1m";
42constexpr std::string_view dim = "\033[2m";
44constexpr std::string_view italic = "\033[3m";
46constexpr std::string_view underline = "\033[4m";
48constexpr std::string_view blink = "\033[5m";
50constexpr std::string_view reverse = "\033[7m";
52constexpr std::string_view hidden = "\033[8m";
54constexpr std::string_view strikethrough = "\033[9m";
55} // namespace text
56
64namespace color {
65
67constexpr std::string_view black = "\033[30m";
69constexpr std::string_view red = "\033[31m";
71constexpr std::string_view green = "\033[32m";
73constexpr std::string_view yellow = "\033[33m";
75constexpr std::string_view blue = "\033[34m";
77constexpr std::string_view magenta = "\033[35m";
79constexpr std::string_view cyan = "\033[36m";
81constexpr std::string_view white = "\033[37m";
82
84constexpr std::string_view bright_black = "\033[90m";
86constexpr std::string_view bright_red = "\033[91m";
88constexpr std::string_view bright_green = "\033[92m";
90constexpr std::string_view bright_yellow = "\033[93m";
92constexpr std::string_view bright_blue = "\033[94m";
94constexpr std::string_view bright_magenta = "\033[95m";
96constexpr std::string_view bright_cyan = "\033[96m";
98constexpr std::string_view bright_white = "\033[97m";
99} // namespace color
100
108namespace bg {
109
111constexpr std::string_view black = "\033[40m";
113constexpr std::string_view red = "\033[41m";
115constexpr std::string_view green = "\033[42m";
117constexpr std::string_view yellow = "\033[43m";
119constexpr std::string_view blue = "\033[44m";
121constexpr std::string_view magenta = "\033[45m";
123constexpr std::string_view cyan = "\033[46m";
125constexpr std::string_view white = "\033[47m";
126
128constexpr std::string_view bright_black = "\033[100m";
130constexpr std::string_view bright_red = "\033[101m";
132constexpr std::string_view bright_green = "\033[102m";
134constexpr std::string_view bright_yellow = "\033[103m";
136constexpr std::string_view bright_blue = "\033[104m";
138constexpr std::string_view bright_magenta = "\033[105m";
140constexpr std::string_view bright_cyan = "\033[106m";
142constexpr std::string_view bright_white = "\033[107m";
143} // namespace bg
144
152namespace cursor {
154constexpr std::string_view home = "\033[H";
156constexpr std::string_view up = "\033[A";
158constexpr std::string_view down = "\033[B";
160constexpr std::string_view right = "\033[C";
162constexpr std::string_view left = "\033[D";
164constexpr std::string_view save = "\033[s";
166constexpr std::string_view restore = "\033[u";
167} // namespace cursor
168
175namespace clear {
177constexpr std::string_view screen = "\033[2J";
179constexpr std::string_view line = "\033[K";
181constexpr std::string_view to_end = "\033[0J";
182} // namespace clear
183
184} // namespace ansi
Namespace containing background color escape sequences.
constexpr std::string_view bright_blue
Background color: bright blue.
constexpr std::string_view yellow
Background color: yellow.
constexpr std::string_view bright_yellow
Background color: bright yellow.
constexpr std::string_view bright_green
Background color: bright green.
constexpr std::string_view green
Background color: green.
constexpr std::string_view blue
Background color: blue.
constexpr std::string_view bright_magenta
Background color: bright magenta.
constexpr std::string_view bright_white
Background color: bright white.
constexpr std::string_view bright_black
Background color: bright black.
constexpr std::string_view red
Background color: red.
constexpr std::string_view cyan
Background color: cyan.
constexpr std::string_view white
Background color: white.
constexpr std::string_view bright_red
Background color: bright red.
constexpr std::string_view magenta
Background color: magenta.
constexpr std::string_view bright_cyan
Background color: bright cyan.
constexpr std::string_view black
Background color: black.
Namespace containing screen clearing escape sequences.
constexpr std::string_view line
Clear from cursor to end of current line.
constexpr std::string_view screen
Clear entire screen and move cursor to home position.
constexpr std::string_view to_end
Clear from cursor to end of screen.
Namespace containing text foreground color escape sequences.
Definition constants.hpp:64
constexpr std::string_view bright_red
Text foreground color: bright red.
Definition constants.hpp:86
constexpr std::string_view bright_green
Text foreground color: bright green.
Definition constants.hpp:88
constexpr std::string_view cyan
Text foreground color: cyan.
Definition constants.hpp:79
constexpr std::string_view bright_blue
Text foreground color: bright blue.
Definition constants.hpp:92
constexpr std::string_view bright_black
Text foreground color: bright black (gray).
Definition constants.hpp:84
constexpr std::string_view magenta
Text foreground color: magenta.
Definition constants.hpp:77
constexpr std::string_view yellow
Text foreground color: yellow.
Definition constants.hpp:73
constexpr std::string_view white
Text foreground color: white.
Definition constants.hpp:81
constexpr std::string_view blue
Text foreground color: blue.
Definition constants.hpp:75
constexpr std::string_view black
Text foreground color: black.
Definition constants.hpp:67
constexpr std::string_view bright_magenta
Text foreground color: bright magenta.
Definition constants.hpp:94
constexpr std::string_view bright_white
Text foreground color: bright white.
Definition constants.hpp:98
constexpr std::string_view red
Text foreground color: red.
Definition constants.hpp:69
constexpr std::string_view green
Text foreground color: green.
Definition constants.hpp:71
constexpr std::string_view bright_cyan
Text foreground color: bright cyan.
Definition constants.hpp:96
constexpr std::string_view bright_yellow
Text foreground color: bright yellow.
Definition constants.hpp:90
Namespace containing cursor movement escape sequences.
constexpr std::string_view left
Move cursor left one column.
constexpr std::string_view home
Move cursor to home position (top-left corner).
constexpr std::string_view restore
Restore previously saved cursor position.
constexpr std::string_view save
Save current cursor position.
constexpr std::string_view right
Move cursor right one column.
constexpr std::string_view down
Move cursor down one line.
constexpr std::string_view up
Move cursor up one line.
Namespace containing text styling escape sequences.
Definition constants.hpp:38
constexpr std::string_view strikethrough
Cross out / strike through text.
Definition constants.hpp:54
constexpr std::string_view dim
Reduce text intensity (dim/faint).
Definition constants.hpp:42
constexpr std::string_view bold
Make text appear bold/bright.
Definition constants.hpp:40
constexpr std::string_view blink
Make text blink (if supported by terminal).
Definition constants.hpp:48
constexpr std::string_view underline
Underline text.
Definition constants.hpp:46
constexpr std::string_view italic
Display text in italic style.
Definition constants.hpp:44
constexpr std::string_view hidden
Conceal text (useful for passwords).
Definition constants.hpp:52
constexpr std::string_view reverse
Reverse video: swap foreground and background colors.
Definition constants.hpp:50
Namespace containing ANSI escape codes for terminal formatting.
Definition constants.hpp:27
constexpr std::string_view reset
Reset all text formatting and colors to terminal default.
Definition constants.hpp:30