23 Rgb(
float red,
float green,
float blue);
25 static Rgb u8(uint8_t red, uint8_t green, uint8_t blue);
55 explicit operator Color()
const;
Object representing a RGB color.
Object representing a RGB color, new version of jngl::Color (which will be deprecated in the future)
uint8_t getGreen_u8() const
0 ... 255
Rgb(float red, float green, float blue)
uint8_t getRed_u8() const
0 ... 255
void setBlue(float)
0.0f ... 1.0f
float getRed() const
0.0f ... 1.0f
float getGreen() const
0.0f ... 1.0fu
void setRed(float)
0.0f ... 1.0f
void setGreen(float)
0.0f ... 1.0f
Rgb(Color)
Implicit conversion for backwards compatibility.
float getBlue() const
0.0f ... 1.0f
uint8_t getBlue_u8() const
0 ... 255
Color interpolate(Color a, Color b, float t)
Returns a color mix between a (t == 0) and b (t == 1)
bool operator==(Rgb a, Rgb b)
Returns true if the two colors are equal in 24 bit SDR space, i.e.
std::ostream & operator<<(std::ostream &os, Rgb color)
Prints the color as jngl::Rgb{ red, green, blue }