Connect++ 0.6.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 85 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 55 of file vic_strings.cpp.

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

Member Data Documentation

◆ blue

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

Definition at line 90 of file vic_strings.hpp.

◆ green

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

Definition at line 89 of file vic_strings.hpp.

◆ grey

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

Definition at line 95 of file vic_strings.hpp.

◆ lblue

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

Definition at line 91 of file vic_strings.hpp.

◆ lgrey

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

Definition at line 96 of file vic_strings.hpp.

◆ nocol

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

Definition at line 87 of file vic_strings.hpp.

◆ num_colours

uint8_t ansi_escape_colours::Colour::num_colours = 10
static

Definition at line 86 of file vic_strings.hpp.

◆ orange

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

Definition at line 92 of file vic_strings.hpp.

◆ purple

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

Definition at line 94 of file vic_strings.hpp.

◆ red

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

Definition at line 88 of file vic_strings.hpp.

◆ yellow

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

Definition at line 93 of file vic_strings.hpp.


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