Hermes
hermes::ConsoleColors Class Reference

Set of 256-terminal color codes. More...

Static Public Member Functions

static std::string color (u8 color_number)
 Get 88/256 color code. More...
 
static std::string background_color (u8 color_number)
 Get 88/256 background color code. More...
 
static std::string combine (const std::string &a, const std::string &b)
 Combine two color codes. More...
 

Static Public Attributes

static char bold [5] = "\e[1m"
 "\e[1m"
 
static char dim [5] = "\e[2m"
 "\e[2m"
 
static char underlined [5] = "\e[4m"
 "\e[4m"
 
static char blink [5] = "\e[5m"
 "\e[5m"
 
static char inverted [5] = "\e[7m"
 "\e[7m"
 
static char hidden [5] = "\e[8m"
 "\e[8m"
 
static char reset [5] = "\e[0m"
 "\e[0m"
 
static char reset_bold [6] = "\e[21m"
 "\e[21m"
 
static char reset_dim [6] = "\e[22m"
 "\e[22m"
 
static char reset_underlined [6] = "\e[24m"
 "\e[24m"
 
static char reset_blink [6] = "\e[25m"
 "\e[25m"
 
static char reset_inverted [6] = "\e[27m"
 "\e[27m"
 
static char reset_hidden [6] = "\e[28m"
 "\e[28m"
 
static char default_color [6] = "\e[39m"
 "\e[39m"
 
static char black [6] = "\e[30m"
 "\e[30m"
 
static char red [6] = "\e[31m"
 "\e[31m"
 
static char green [6] = "\e[32m"
 "\e[32m"
 
static char yellow [6] = "\e[33m"
 "\e[33m"
 
static char blue [6] = "\e[34m"
 "\e[34m"
 
static char magenta [6] = "\e[35m"
 "\e[35m"
 
static char cyan [6] = "\e[36m"
 "\e[36m"
 
static char light_gray [6] = "\e[37m"
 "\e[37m"
 
static char dark_gray [6] = "\e[90m"
 "\e[90m"
 
static char light_red [6] = "\e[91m"
 "\e[91m"
 
static char light_green [6] = "\e[92m"
 "\e[92m"
 
static char light_yellow [6] = "\e[93m"
 "\e[93m"
 
static char light_blue [6] = "\e[94m"
 "\e[94m"
 
static char light_magenta [6] = "\e[95m"
 "\e[95m"
 
static char light_cyan [6] = "\e[96m"
 "\e[96m"
 
static char white [6] = "\e[97m"
 "\e[97m"
 
static char background_default_color [6] = "\e[49m"
 "\e[49m"
 
static char background_black [6] = "\e[40m"
 "\e[40m"
 
static char background_red [6] = "\e[41m"
 "\e[41m"
 
static char background_green [6] = "\e[42m"
 "\e[42m"
 
static char background_yellow [6] = "\e[43m"
 "\e[43m"
 
static char background_blue [6] = "\e[44m"
 "\e[44m"
 
static char background_magenta [6] = "\e[45m"
 "\e[45m"
 
static char background_cyan [6] = "\e[46m"
 "\e[46m"
 
static char background_light_gray [6] = "\e[47m"
 "\e[47m"
 
static char background_dark_gray [7] = "\e[100m"
 "\e[100m"
 
static char background_light_red [7] = "\e[101m"
 "\e[101m"
 
static char background_light_green [7] = "\e[102m"
 "\e[102m"
 
static char background_light_yellow [7] = "\e[103m"
 "\e[103m"
 
static char background_light_blue [7] = "\e[104m"
 "\e[104m"
 
static char background_light_magenta [7] = "\e[105m"
 "\e[105m"
 
static char background_light_cyan [7] = "\e[106m"
 "\e[106m"
 
static char background_white [7] = "\e[107m"
 "\e[107m"
 

Detailed Description

Set of 256-terminal color codes.

Note
Extracted from https://misc.flogisoft.com/bash/tip_colors_and_formatting

Member Function Documentation

◆ background_color()

static std::string hermes::ConsoleColors::background_color ( u8  color_number)
inlinestatic

Get 88/256 background color code.

Parameters
color_number
Returns

◆ color()

static std::string hermes::ConsoleColors::color ( u8  color_number)
inlinestatic

Get 88/256 color code.

Parameters
color_number
Returns

◆ combine()

static std::string hermes::ConsoleColors::combine ( const std::string &  a,
const std::string &  b 
)
inlinestatic

Combine two color codes.

Parameters
a
b
Returns

The documentation for this class was generated from the following files: