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 7 of file colormod.h.

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

Function Documentation

◆ Modifier()

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

Definition at line 18 of file colormod.h.

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

Variable Documentation

◆ FAILED

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

Definition at line 22 of file colormod.h.

Referenced by CheckProb().

◆ PASSED

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

Definition at line 23 of file colormod.h.

Referenced by CheckProb().