OscProb
Color Namespace Reference

Enumerations

enum  Code {
  FG_RED = 31 , FG_GREEN = 32 , FG_BLUE = 34 , FG_DEFAULT = 39 ,
  BG_RED = 41 , BG_GREEN = 42 , BG_BLUE = 44 , BG_DEFAULT = 49
}
 

Functions

string Modifier (string s, Code code)
 

Variables

static const string FAILED = Modifier("FAILED:", FG_RED)
 
static const string PASSED = Modifier("PASSED:", FG_GREEN)
 

Enumeration Type Documentation

◆ Code

Enumerator
FG_RED 
FG_GREEN 
FG_BLUE 
FG_DEFAULT 
BG_RED 
BG_GREEN 
BG_BLUE 
BG_DEFAULT 

Definition at line 5 of file colormod.h.

5 {
6 FG_RED = 31,
7 FG_GREEN = 32,
8 FG_BLUE = 34,
9 FG_DEFAULT = 39,
10 BG_RED = 41,
11 BG_GREEN = 42,
12 BG_BLUE = 44,
13 BG_DEFAULT = 49
14 };
@ BG_BLUE
Definition: colormod.h:12
@ BG_DEFAULT
Definition: colormod.h:13
@ FG_GREEN
Definition: colormod.h:7
@ BG_GREEN
Definition: colormod.h:11
@ FG_DEFAULT
Definition: colormod.h:9
@ FG_BLUE
Definition: colormod.h:8
@ BG_RED
Definition: colormod.h:10
@ FG_RED
Definition: colormod.h:6

Function Documentation

◆ Modifier()

string Color::Modifier ( string  s,
Code  code 
)

Definition at line 16 of file colormod.h.

16 {
17 return "\033[" + to_string(code) + "m" + s + "\033[0m";
18 }

Variable Documentation

◆ FAILED

const string Color::FAILED = Modifier("FAILED:", FG_RED)
static

Definition at line 20 of file colormod.h.

Referenced by CheckProb().

◆ PASSED

const string Color::PASSED = Modifier("PASSED:", FG_GREEN)
static

Definition at line 21 of file colormod.h.

Referenced by CheckProb().