Simox  2.3.74.0
simox::color::KellyColor Struct Reference

An RGBA color, where each component is a byte in [0, 255]. Additionally contains an id denoting its position. More...

Inheritance diagram for simox::color::KellyColor:
simox::color::Color

Public Member Functions

 KellyColor (size_t id=-1)
 
 KellyColor (uint8_t r, uint8_t g, uint8_t b, size_t id)
 
 KellyColor (Color color, size_t id)
 
bool operator< (const KellyColor &other) const
 
- Public Member Functions inherited from simox::color::Color
 Color ()=default
 Construct a black color. More...
 
 Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
 Construct a color from RGBA. More...
 
template<typename Int , std::enable_if_t< std::is_integral_v< Int >, int > = 0>
 Color (Int r, Int g, Int b, Int a=255)
 Construct a color from integer RGBA. More...
 
template<typename Float , std::enable_if_t< std::is_floating_point_v< Float >, int > = 0>
 Color (Float r, Float g, Float b, Float a=1.0)
 Construct a color from float RGBA. More...
 
template<typename T >
 Color (Eigen::Matrix< T, 3, 1 > vector3)
 Construct a color from an RGB vector. More...
 
template<typename T >
 Color (Eigen::Matrix< T, 4, 1 > vector4)
 Construct a color from an RGBA vector. More...
 
Eigen::Vector3i to_vector3i () const
 
Eigen::Vector4i to_vector4i () const
 
Eigen::Vector3f to_vector3f () const
 
Eigen::Vector4f to_vector4f () const
 
template<typename IntOrFloat >
Color with_alpha (IntOrFloat a) const
 Return a copy of this with the given alpha. More...
 

Data Fields

size_t id
 
- Data Fields inherited from simox::color::Color
uint8_t r = 0
 Red in [0, 255]. More...
 
uint8_t g = 0
 Green in [0, 255]. More...
 
uint8_t b = 0
 Blue in [0, 255]. More...
 
uint8_t a = 255
 Alpha in [0, 255], i.e. opacity (0: transparent, 255: visible). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from simox::color::Color
static Color black (int a=255)
 
static Color white (int a=255)
 
static Color gray (int g=128, int a=255)
 
static Color red (int r=255, int a=255)
 
static Color green (int g=255, int a=255)
 
static Color blue (int b=255, int a=255)
 
static Color cyan (int c=255, int a=255)
 Green + Blue. More...
 
static Color yellow (int y=255, int a=255)
 Red + Green. More...
 
static Color magenta (int m=255, int a=255)
 Red + Blue. More...
 
static Color orange (int o=255, int a=255)
 2 Red + 1 Green More...
 
static Color pink (int p=255, int a=255)
 2 Red + 1 Blue More...
 
static Color lime (int l=255, int a=255)
 2 Green + 1 Red More...
 
static Color turquoise (int t=255, int a=255)
 2 Green + 1 Blue More...
 
static Color azure (int az=255, int a=255)
 2 Blue + 1 Green More...
 
static Color purple (int p=255, int a=255)
 2 Blue + 1 Red More...
 
static Color kit_green (int a=255)
 
static Color kit_blue (int a=255)
 
static Color kit_maygreen (int a=255)
 
static Color kit_yellow (int a=255)
 
static Color kit_orange (int a=255)
 
static Color kit_brown (int a=255)
 
static Color kit_red (int a=255)
 
static Color kit_purple (int a=255)
 
static Color kit_cyan (int a=255)
 

Detailed Description

An RGBA color, where each component is a byte in [0, 255]. Additionally contains an id denoting its position.

Constructor & Destructor Documentation

◆ KellyColor() [1/3]

simox::color::KellyColor::KellyColor ( size_t  id = -1)
inline

◆ KellyColor() [2/3]

simox::color::KellyColor::KellyColor ( uint8_t  r,
uint8_t  g,
uint8_t  b,
size_t  id 
)
inline

◆ KellyColor() [3/3]

simox::color::KellyColor::KellyColor ( Color  color,
size_t  id 
)
inline

Member Function Documentation

◆ operator<()

bool simox::color::KellyColor::operator< ( const KellyColor other) const
inline

Field Documentation

◆ id

size_t simox::color::KellyColor::id