Compile-time constants. More...
#include <string_view>Go to the source code of this file.
Namespaces | |
| namespace | ansi |
| Namespace containing ANSI escape codes for terminal formatting. | |
| namespace | ansi::text |
| Namespace containing text styling escape sequences. | |
| namespace | ansi::color |
| Namespace containing text foreground color escape sequences. | |
| namespace | ansi::bg |
| Namespace containing background color escape sequences. | |
| namespace | ansi::cursor |
| Namespace containing cursor movement escape sequences. | |
| namespace | ansi::clear |
| Namespace containing screen clearing escape sequences. | |
Variables | |
| constexpr std::string_view | ansi::reset = "\033[0m" |
| Reset all text formatting and colors to terminal default. | |
| constexpr std::string_view | ansi::text::bold = "\033[1m" |
| Make text appear bold/bright. | |
| constexpr std::string_view | ansi::text::dim = "\033[2m" |
| Reduce text intensity (dim/faint). | |
| constexpr std::string_view | ansi::text::italic = "\033[3m" |
| Display text in italic style. | |
| constexpr std::string_view | ansi::text::underline = "\033[4m" |
| Underline text. | |
| constexpr std::string_view | ansi::text::blink = "\033[5m" |
| Make text blink (if supported by terminal). | |
| constexpr std::string_view | ansi::text::reverse = "\033[7m" |
| Reverse video: swap foreground and background colors. | |
| constexpr std::string_view | ansi::text::hidden = "\033[8m" |
| Conceal text (useful for passwords). | |
| constexpr std::string_view | ansi::text::strikethrough = "\033[9m" |
| Cross out / strike through text. | |
| constexpr std::string_view | ansi::color::black = "\033[30m" |
| Text foreground color: black. | |
| constexpr std::string_view | ansi::color::red = "\033[31m" |
| Text foreground color: red. | |
| constexpr std::string_view | ansi::color::green = "\033[32m" |
| Text foreground color: green. | |
| constexpr std::string_view | ansi::color::yellow = "\033[33m" |
| Text foreground color: yellow. | |
| constexpr std::string_view | ansi::color::blue = "\033[34m" |
| Text foreground color: blue. | |
| constexpr std::string_view | ansi::color::magenta = "\033[35m" |
| Text foreground color: magenta. | |
| constexpr std::string_view | ansi::color::cyan = "\033[36m" |
| Text foreground color: cyan. | |
| constexpr std::string_view | ansi::color::white = "\033[37m" |
| Text foreground color: white. | |
| constexpr std::string_view | ansi::color::bright_black = "\033[90m" |
| Text foreground color: bright black (gray). | |
| constexpr std::string_view | ansi::color::bright_red = "\033[91m" |
| Text foreground color: bright red. | |
| constexpr std::string_view | ansi::color::bright_green = "\033[92m" |
| Text foreground color: bright green. | |
| constexpr std::string_view | ansi::color::bright_yellow = "\033[93m" |
| Text foreground color: bright yellow. | |
| constexpr std::string_view | ansi::color::bright_blue = "\033[94m" |
| Text foreground color: bright blue. | |
| constexpr std::string_view | ansi::color::bright_magenta = "\033[95m" |
| Text foreground color: bright magenta. | |
| constexpr std::string_view | ansi::color::bright_cyan = "\033[96m" |
| Text foreground color: bright cyan. | |
| constexpr std::string_view | ansi::color::bright_white = "\033[97m" |
| Text foreground color: bright white. | |
| constexpr std::string_view | ansi::bg::black = "\033[40m" |
| Background color: black. | |
| constexpr std::string_view | ansi::bg::red = "\033[41m" |
| Background color: red. | |
| constexpr std::string_view | ansi::bg::green = "\033[42m" |
| Background color: green. | |
| constexpr std::string_view | ansi::bg::yellow = "\033[43m" |
| Background color: yellow. | |
| constexpr std::string_view | ansi::bg::blue = "\033[44m" |
| Background color: blue. | |
| constexpr std::string_view | ansi::bg::magenta = "\033[45m" |
| Background color: magenta. | |
| constexpr std::string_view | ansi::bg::cyan = "\033[46m" |
| Background color: cyan. | |
| constexpr std::string_view | ansi::bg::white = "\033[47m" |
| Background color: white. | |
| constexpr std::string_view | ansi::bg::bright_black = "\033[100m" |
| Background color: bright black. | |
| constexpr std::string_view | ansi::bg::bright_red = "\033[101m" |
| Background color: bright red. | |
| constexpr std::string_view | ansi::bg::bright_green = "\033[102m" |
| Background color: bright green. | |
| constexpr std::string_view | ansi::bg::bright_yellow = "\033[103m" |
| Background color: bright yellow. | |
| constexpr std::string_view | ansi::bg::bright_blue = "\033[104m" |
| Background color: bright blue. | |
| constexpr std::string_view | ansi::bg::bright_magenta = "\033[105m" |
| Background color: bright magenta. | |
| constexpr std::string_view | ansi::bg::bright_cyan = "\033[106m" |
| Background color: bright cyan. | |
| constexpr std::string_view | ansi::bg::bright_white = "\033[107m" |
| Background color: bright white. | |
| constexpr std::string_view | ansi::cursor::home = "\033[H" |
| Move cursor to home position (top-left corner). | |
| constexpr std::string_view | ansi::cursor::up = "\033[A" |
| Move cursor up one line. | |
| constexpr std::string_view | ansi::cursor::down = "\033[B" |
| Move cursor down one line. | |
| constexpr std::string_view | ansi::cursor::right = "\033[C" |
| Move cursor right one column. | |
| constexpr std::string_view | ansi::cursor::left = "\033[D" |
| Move cursor left one column. | |
| constexpr std::string_view | ansi::cursor::save = "\033[s" |
| Save current cursor position. | |
| constexpr std::string_view | ansi::cursor::restore = "\033[u" |
| Restore previously saved cursor position. | |
| constexpr std::string_view | ansi::clear::screen = "\033[2J" |
| Clear entire screen and move cursor to home position. | |
| constexpr std::string_view | ansi::clear::line = "\033[K" |
| Clear from cursor to end of current line. | |
| constexpr std::string_view | ansi::clear::to_end = "\033[0J" |
| Clear from cursor to end of screen. | |
Compile-time constants.
This header provides a comprehensive collection of compile-time ANSI escape sequence constants organized in logical namespaces for terminal text styling, colors, cursor movement, and screen operations. All constants are available at compile-time for efficient and zero-cost terminal output formatting.
Definition in file constants.hpp.