Go to the documentation of this file.
3 #include <RobotAPI/interface/ArViz/Elements.h>
5 #include <SimoxUtility/color/Color.h>
26 Color(
int r,
int g,
int b,
int a = 255)
28 this->r = simox::color::to_byte(r);
29 this->g = simox::color::to_byte(g);
30 this->b = simox::color::to_byte(b);
31 this->
a = simox::color::to_byte(
a);
33 Color(
float r,
float g,
float b,
float a = 1.0)
35 this->r = simox::color::to_byte(r);
36 this->g = simox::color::to_byte(g);
37 this->b = simox::color::to_byte(b);
38 this->
a = simox::color::to_byte(
a);
64 return simox::Color::black(
a);
69 return simox::Color::white(
a);
74 return simox::Color::gray(g,
a);
91 return simox::Color::blue(b,
a);
100 return simox::Color::cyan(
c,
a);
106 return simox::Color::yellow(y,
a);
112 return simox::Color::magenta(m,
a);
127 return simox::Color::pink(p,
a);
133 return simox::Color::lime(l,
a);
139 return simox::Color::turquoise(t,
a);
145 return simox::Color::azure(az,
a);
151 return simox::Color::purple(p,
a);
159 return os <<
"(" << int(
c.r) <<
" " << int(
c.g) <<
" " << int(
c.b)
160 <<
" | " << int(
c.a) <<
")";
165 return lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b && lhs.a == rhs.a;
170 return !(lhs == rhs);
178 return lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b && lhs.a == rhs.a;
189 return os <<
"(" << int(
c.r) <<
" " << int(
c.g) <<
" " << int(
c.b)
190 <<
" | " << int(
c.a) <<
")";
static Color black(int a=255)
static Color purple(int p=255, int a=255)
2 Blue + 1 Red
static Color fromRGBA(int r, int g, int b, int a=255)
Construct a byte color from R, G, B and optional alpha.
static Color blue(int b=255, int a=255)
Color(float r, float g, float b, float a=1.0)
std::ostream & operator<<(std::ostream &os, const Color &c)
static Color lime(int l=255, int a=255)
2 Green + 1 Red
Color(int r, int g, int b, int a=255)
static Color white(int a=255)
bool operator==(const viz::data::Color &lhs, const simox::color::Color &rhs)
static Color turquoise(int t=255, int a=255)
2 Green + 1 Blue
double a(double t, double a0, double j)
uint32_t Color
RGBA color.
bool operator!=(const Color &lhs, const Color &rhs)
static Color yellow(int y=255, int a=255)
Red + Green.
bool operator==(const Color &lhs, const Color &rhs)
static Color gray(int g=128, int a=255)
static Color red(int r=255, int a=255)
static Color cyan(int c=255, int a=255)
Green + Blue.
static Color fromRGBA(simox::Color c)
Construct from a simox Color.
static Color pink(int p=255, int a=255)
2 Red + 1 Blue
static Color magenta(int m=255, int a=255)
Red + Blue.
static Color orange(int o=255, int a=255)
2 Red + 1 Green
static Color green(int g=255, int a=255)
Color(const data::Color &c)
static Color azure(int az=255, int a=255)
2 Blue + 1 Green
std::ostream & operator<<(std::ostream &os, const viz::data::Color &c)
This file is part of ArmarX.
static Color fromRGBA(float r, float g, float b, float a=1.0)
Construct a float color from R, G, B and optional alpha.