![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Terminal color escape sequence constants and enable/disable control implementation. More...
Go to the source code of this file.
Namespaces | |
| namespace | sham |
| namespace for backends this one is named only sham since shambackends is too long to write | |
| namespace | sham::term::style |
| Terminal text styling escape sequences (bold, faint, underline, blink, reset). | |
| namespace | sham::term::colors_8b |
| 8 bit 8-color palette escape sequences. | |
| namespace | sham::term::colors_256 |
| 256-color palette escape sequences (\x1b[38;5;Nm / \x1b[48;5;Nm). | |
| namespace | sham::term::colors_24b |
| 24-bit RGB truecolor escape sequences (\x1b[38;2;r;g;bm / \x1b[48;2;r;g;bm). | |
Macros | |
| #define | TERM_ESCAPTE_CHAR "\x1b[" |
Functions | |
| ColorLevel | sham::term::color_level () |
| Query the currently detected/forced terminal color support level. | |
| void | sham::term::set_color_level (ColorLevel level) |
| Set the terminal color support level. | |
| void | sham::term::enable_colors () |
| Enable colors. | |
| void | sham::term::disable_colors () |
| Disable all colors. | |
| bool | sham::term::are_colors_enabled () |
| Query whether terminal color output is currently enabled. | |
| const char * | sham::term::style::reset () |
| escape sequence to reset the terminal text formatting. | |
| const char * | sham::term::style::bold () |
| escape sequence to set bold text formatting. | |
| const char * | sham::term::style::faint () |
| escape sequence to set faint (dim) text formatting. | |
| const char * | sham::term::style::underline () |
| escape sequence to set underlined text formatting. | |
| const char * | sham::term::style::blink () |
| escape sequence to set blinking text formatting. | |
| const char * | sham::term::colors_8b::black () |
| Escape sequence to set black text color. | |
| const char * | sham::term::colors_8b::red () |
| Escape sequence to set red text color. | |
| const char * | sham::term::colors_8b::green () |
| Escape sequence to set green text color. | |
| const char * | sham::term::colors_8b::yellow () |
| Escape sequence to set yellow text color. | |
| const char * | sham::term::colors_8b::blue () |
| Escape sequence to set blue text color. | |
| const char * | sham::term::colors_8b::magenta () |
| Escape sequence to set magenta (pink) text color. | |
| const char * | sham::term::colors_8b::cyan () |
| Escape sequence to set cyan text color. | |
| const char * | sham::term::colors_8b::white () |
| Escape sequence to set white text color. | |
| std::string | sham::term::colors_256::foreground (std::uint8_t index) |
| Escape sequence to set the given palette index as foreground text color. | |
| std::string | sham::term::colors_256::background (std::uint8_t index) |
| Escape sequence to set the given palette index as background color. | |
| std::string | sham::term::colors_24b::foreground (std::uint8_t r, std::uint8_t g, std::uint8_t b) |
| Escape sequence to set the given RGB foreground text color. | |
| std::string | sham::term::colors_24b::background (std::uint8_t r, std::uint8_t g, std::uint8_t b) |
| Escape sequence to set the given RGB background color. | |
Terminal color escape sequence constants and enable/disable control implementation.
Definition in file color.cpp.
| bool sham::term::are_colors_enabled | ( | ) |
| ColorLevel sham::term::color_level | ( | ) |
| void sham::term::enable_colors | ( | ) |
| void sham::term::set_color_level | ( | ColorLevel | level | ) |