Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | List of all members
shambase::details::TermColors Struct Reference

Struct representing the terminal colors to be used for printing. More...

#include <shambase/include/shambase/term_colors.hpp>

+ Collaboration diagram for shambase::details::TermColors:

Static Public Member Functions

static TermColors get_config_nocolors ()
 Returns a TermColors struct with all colors disabled.
 
static TermColors get_config_colors ()
 Returns a TermColors struct with all colors enabled.
 

Public Attributes

bool colors_on = true
 are colors on in this config
 
std::string esc_char = "\x1b["
 Escape character for terminal control sequences.
 
std::string reset = "\x1b[" "0m"
 Escape sequence to reset the terminal text formatting.
 
std::string bold = "\x1b[" "1m"
 Escape sequence to set bold text formatting.
 
std::string faint = "\x1b[" "2m"
 Escape sequence to set faint (dim) text formatting.
 
std::string underline = "\x1b[" "4m"
 Escape sequence to set underlined text formatting.
 
std::string blink = "\x1b[" "5m"
 Escape sequence to set blinking text formatting.
 
std::string col8b_black = "\x1b[" "30m"
 Escape sequence to set black text color.
 
std::string col8b_red = "\x1b[" "31m"
 Escape sequence to set red text color.
 
std::string col8b_green = "\x1b[" "32m"
 Escape sequence to set green text color.
 
std::string col8b_yellow = "\x1b[" "33m"
 Escape sequence to set yellow text color.
 
std::string col8b_blue = "\x1b[" "34m"
 Escape sequence to set blue text color.
 
std::string col8b_magenta = "\x1b[" "35m"
 Escape sequence to set magenta (pink) text color.
 
std::string col8b_cyan = "\x1b[" "36m"
 Escape sequence to set cyan text color.
 
std::string col8b_white = "\x1b[" "37m"
 Escape sequence to set white text color.
 

Detailed Description

Struct representing the terminal colors to be used for printing.

This struct contains the escape sequences for the different terminal colors and can be used to print colored text.

Definition at line 39 of file term_colors.hpp.

Member Function Documentation

◆ get_config_colors()

static TermColors shambase::details::TermColors::get_config_colors ( )
inlinestatic

Returns a TermColors struct with all colors enabled.

Definition at line 81 of file term_colors.hpp.

◆ get_config_nocolors()

static TermColors shambase::details::TermColors::get_config_nocolors ( )
inlinestatic

Returns a TermColors struct with all colors disabled.

Definition at line 74 of file term_colors.hpp.

Member Data Documentation

◆ blink

std::string shambase::details::TermColors::blink = "\x1b[" "5m"

Escape sequence to set blinking text formatting.

Definition at line 53 of file term_colors.hpp.

◆ bold

std::string shambase::details::TermColors::bold = "\x1b[" "1m"

Escape sequence to set bold text formatting.

Definition at line 47 of file term_colors.hpp.

◆ col8b_black

std::string shambase::details::TermColors::col8b_black = "\x1b[" "30m"

Escape sequence to set black text color.

Definition at line 55 of file term_colors.hpp.

◆ col8b_blue

std::string shambase::details::TermColors::col8b_blue = "\x1b[" "34m"

Escape sequence to set blue text color.

Definition at line 63 of file term_colors.hpp.

◆ col8b_cyan

std::string shambase::details::TermColors::col8b_cyan = "\x1b[" "36m"

Escape sequence to set cyan text color.

Definition at line 67 of file term_colors.hpp.

◆ col8b_green

std::string shambase::details::TermColors::col8b_green = "\x1b[" "32m"

Escape sequence to set green text color.

Definition at line 59 of file term_colors.hpp.

◆ col8b_magenta

std::string shambase::details::TermColors::col8b_magenta = "\x1b[" "35m"

Escape sequence to set magenta (pink) text color.

Definition at line 65 of file term_colors.hpp.

◆ col8b_red

std::string shambase::details::TermColors::col8b_red = "\x1b[" "31m"

Escape sequence to set red text color.

Definition at line 57 of file term_colors.hpp.

◆ col8b_white

std::string shambase::details::TermColors::col8b_white = "\x1b[" "37m"

Escape sequence to set white text color.

Definition at line 69 of file term_colors.hpp.

◆ col8b_yellow

std::string shambase::details::TermColors::col8b_yellow = "\x1b[" "33m"

Escape sequence to set yellow text color.

Definition at line 61 of file term_colors.hpp.

◆ colors_on

bool shambase::details::TermColors::colors_on = true

are colors on in this config

Definition at line 40 of file term_colors.hpp.

◆ esc_char

std::string shambase::details::TermColors::esc_char = "\x1b["

Escape character for terminal control sequences.

Definition at line 43 of file term_colors.hpp.

◆ faint

std::string shambase::details::TermColors::faint = "\x1b[" "2m"

Escape sequence to set faint (dim) text formatting.

Definition at line 49 of file term_colors.hpp.

◆ reset

std::string shambase::details::TermColors::reset = "\x1b[" "0m"

Escape sequence to reset the terminal text formatting.

Definition at line 45 of file term_colors.hpp.

◆ underline

std::string shambase::details::TermColors::underline = "\x1b[" "4m"

Escape sequence to set underlined text formatting.

Definition at line 51 of file term_colors.hpp.


The documentation for this struct was generated from the following file: