Connect++ 0.5.0
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
ansi_escape_colours::Colour Struct Reference

#include <vic_strings.hpp>

Static Public Member Functions

static std::string name_to_string (const ColourName &)
 

Static Public Attributes

static uint8_t num_colours = 10
 
static std::string nocol = std::string("\033[0m")
 
static std::string red = std::string("\033[38;5;9m")
 
static std::string green = std::string("\033[38;5;10m")
 
static std::string blue = std::string("\033[38;5;12m")
 
static std::string lblue = std::string("\033[38;5;14m")
 
static std::string orange = std::string("\033[38;5;208m")
 
static std::string yellow = std::string("\033[38;5;11m")
 
static std::string purple = std::string("\033[38;5;13m")
 
static std::string grey = std::string("\033[38;5;242m")
 
static std::string lgrey = std::string("\033[38;5;248m")
 

Detailed Description

Codes for colours. These are standard, see:

https://en.wikipedia.org/wiki/ANSI_escape_code

The third digit is 6-bit RGB, 16 + 36R + 6G + B. 0 to 15 are standard colours and the rest (232 to 255) are greyscale.

Definition at line 82 of file vic_strings.hpp.

Member Function Documentation

◆ name_to_string()

std::string ansi_escape_colours::Colour::name_to_string ( const ColourName & name)
static

Definition at line 53 of file vic_strings.cpp.

53 {
54 switch(name) {
55 case ColourName::NOCOL:
56 return Colour::nocol;
57 break;
58 case ColourName::RED:
59 return Colour::red;
60 break;
61 case ColourName::GREEN:
62 return Colour::green;
63 break;
64 case ColourName::BLUE:
65 return Colour::blue;
66 break;
67 case ColourName::LBLUE:
68 return Colour::lblue;
69 break;
70 case ColourName::ORANGE:
71 return Colour::orange;
72 break;
73 case ColourName::YELLOW:
74 return Colour::yellow;
75 break;
76 case ColourName::PURPLE:
77 return Colour::purple;
78 break;
79 case ColourName::GREY:
80 return Colour::grey;
81 break;
82 case ColourName::LGREY:
83 return Colour::lgrey;
84 break;
85 default:
86 return Colour::nocol;
87 break;
88 }
89 }

Member Data Documentation

◆ blue

std::string ansi_escape_colours::Colour::blue = std::string("\033[38;5;12m")
static

Definition at line 87 of file vic_strings.hpp.

◆ green

std::string ansi_escape_colours::Colour::green = std::string("\033[38;5;10m")
static

Definition at line 86 of file vic_strings.hpp.

◆ grey

std::string ansi_escape_colours::Colour::grey = std::string("\033[38;5;242m")
static

Definition at line 92 of file vic_strings.hpp.

◆ lblue

std::string ansi_escape_colours::Colour::lblue = std::string("\033[38;5;14m")
static

Definition at line 88 of file vic_strings.hpp.

◆ lgrey

std::string ansi_escape_colours::Colour::lgrey = std::string("\033[38;5;248m")
static

Definition at line 93 of file vic_strings.hpp.

◆ nocol

std::string ansi_escape_colours::Colour::nocol = std::string("\033[0m")
static

Definition at line 84 of file vic_strings.hpp.

◆ num_colours

uint8_t ansi_escape_colours::Colour::num_colours = 10
static

Definition at line 83 of file vic_strings.hpp.

◆ orange

std::string ansi_escape_colours::Colour::orange = std::string("\033[38;5;208m")
static

Definition at line 89 of file vic_strings.hpp.

◆ purple

std::string ansi_escape_colours::Colour::purple = std::string("\033[38;5;13m")
static

Definition at line 91 of file vic_strings.hpp.

◆ red

std::string ansi_escape_colours::Colour::red = std::string("\033[38;5;9m")
static

Definition at line 85 of file vic_strings.hpp.

◆ yellow

std::string ansi_escape_colours::Colour::yellow = std::string("\033[38;5;11m")
static

Definition at line 90 of file vic_strings.hpp.


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