Specs
Beautiful C++ Test Framework
Loading...
Searching...
No Matches
PrintColor.h File Reference
#include <string_format.h>
#include <cstdint>
#include <iostream>
#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  SpecsCpp
 
namespace  SpecsCpp::Colors
 
namespace  SpecsCpp::Colors::Unix
 

Enumerations

enum class  SpecsCpp::Colors::Color {
  SpecsCpp::Colors::None = 0 , SpecsCpp::Colors::Black = 30 , SpecsCpp::Colors::Red = 31 , SpecsCpp::Colors::Green = 32 ,
  SpecsCpp::Colors::Yellow = 33 , SpecsCpp::Colors::Blue = 34 , SpecsCpp::Colors::Purple = 35 , SpecsCpp::Colors::Cyan = 36 ,
  SpecsCpp::Colors::LightGray = 37 , SpecsCpp::Colors::DarkGray = 90 , SpecsCpp::Colors::LightRed = 91 , SpecsCpp::Colors::LightGreen = 92 ,
  SpecsCpp::Colors::LightYellow = 93 , SpecsCpp::Colors::LightBlue = 94 , SpecsCpp::Colors::LightPurple = 95 , SpecsCpp::Colors::LightCyan = 96 ,
  SpecsCpp::Colors::White = 97
}
 
enum class  SpecsCpp::Colors::Unix::Style : uint8_t {
  SpecsCpp::Colors::Unix::Normal = 0 , SpecsCpp::Colors::Unix::Bold = 1 , SpecsCpp::Colors::Unix::Dim = 2 , SpecsCpp::Colors::Unix::Italic = 3 ,
  SpecsCpp::Colors::Unix::Underline = 4 , SpecsCpp::Colors::Unix::SlowBlink = 5 , SpecsCpp::Colors::Unix::RapidBlink = 6 , SpecsCpp::Colors::Unix::Inverted = 7 ,
  SpecsCpp::Colors::Unix::Conceal = 8 , SpecsCpp::Colors::Unix::CrossedOut = 9
}
 
enum class  SpecsCpp::Colors::Unix::ForegroundColor : uint8_t {
  SpecsCpp::Colors::Unix::Black = 30 , SpecsCpp::Colors::Unix::Red = 31 , SpecsCpp::Colors::Unix::Green = 32 , SpecsCpp::Colors::Unix::Yellow = 33 ,
  SpecsCpp::Colors::Unix::Blue = 34 , SpecsCpp::Colors::Unix::Purple = 35 , SpecsCpp::Colors::Unix::Cyan = 36 , SpecsCpp::Colors::Unix::LightGray = 37 ,
  SpecsCpp::Colors::Unix::DarkGray = 90 , SpecsCpp::Colors::Unix::LightRed = 91 , SpecsCpp::Colors::Unix::LightGreen = 92 , SpecsCpp::Colors::Unix::LightYellow = 93 ,
  SpecsCpp::Colors::Unix::LightBlue = 94 , SpecsCpp::Colors::Unix::LightPurple = 95 , SpecsCpp::Colors::Unix::LightCyan = 96 , SpecsCpp::Colors::Unix::White = 97
}
 
enum class  SpecsCpp::Colors::Unix::BackgroundColor : uint8_t {
  SpecsCpp::Colors::Unix::Black = 40 , SpecsCpp::Colors::Unix::Red = 41 , SpecsCpp::Colors::Unix::Green = 42 , SpecsCpp::Colors::Unix::Yellow = 43 ,
  SpecsCpp::Colors::Unix::Blue = 44 , SpecsCpp::Colors::Unix::Purple = 45 , SpecsCpp::Colors::Unix::Cyan = 46 , SpecsCpp::Colors::Unix::LightGray = 47 ,
  SpecsCpp::Colors::Unix::DarkGray = 100 , SpecsCpp::Colors::Unix::LightRed = 101 , SpecsCpp::Colors::Unix::LightGreen = 102 , SpecsCpp::Colors::Unix::LightYellow = 103 ,
  SpecsCpp::Colors::Unix::LightBlue = 104 , SpecsCpp::Colors::Unix::LightPurple = 105 , SpecsCpp::Colors::Unix::LightCyan = 106 , SpecsCpp::Colors::Unix::White = 107
}
 

Functions

void SpecsCpp::Colors::PrintColor (std::string_view text, Color foreground=Color::None, Color background=Color::None, Unix::Style style=Unix::Style::Normal)