ttx 0.1.0
Loading...
Searching...
No Matches
ttx::Color Struct Reference

#include </home/runner/work/ttx/ttx/lib/include/ttx/graphics_rendition.h>

Public Types

enum  Palette : u8 {
  None , Custom , Black , Red ,
  Green , Brown , Blue , Magenta ,
  Cyan , LightGrey , DarkGrey , LightRed ,
  LightGreen , Yellow , LightBlue , LightMagenta ,
  LightCyan , White
}
 

Public Member Functions

 Color ()=default
 
constexpr Color (Palette c)
 
constexpr Color (u8 r, u8 g, u8 b)
 
auto operator== (Color const &other) const -> bool=default
 

Public Attributes

Palette c = Palette::None
 
u8 r = 0
 
u8 g = 0
 
u8 b = 0
 

Friends

constexpr friend auto tag_invoke (di::Tag< di::reflect >, di::InPlaceType< Color >)
 

Member Enumeration Documentation

◆ Palette

Enumerator
None 
Custom 
Black 
Red 
Green 
Brown 
Blue 
Magenta 
Cyan 
LightGrey 
DarkGrey 
LightRed 
LightGreen 
Yellow 
LightBlue 
LightMagenta 
LightCyan 
White 

Constructor & Destructor Documentation

◆ Color() [1/3]

ttx::Color::Color ( )
default

◆ Color() [2/3]

ttx::Color::Color ( Palette c)
inlineconstexpr

◆ Color() [3/3]

ttx::Color::Color ( u8 r,
u8 g,
u8 b )
inlineconstexpr

Member Function Documentation

◆ operator==()

auto ttx::Color::operator== ( Color const & other) const -> bool=default
default

Friends And Related Symbol Documentation

◆ tag_invoke

friend auto tag_invoke ( di::Tag< di::reflect > ,
di::InPlaceType< Color >  )
friend

Member Data Documentation

◆ b

u8 ttx::Color::b = 0

◆ c

Palette ttx::Color::c = Palette::None

◆ g

u8 ttx::Color::g = 0

◆ r

u8 ttx::Color::r = 0

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