Object representing a RGB color, new version of jngl::Color (which will be deprecated in the future)
More...
#include <jngl/Rgb.hpp>
|
| constexpr | Rgb (float red, float green, float blue) |
| |
|
| Rgb (Color) |
| | Implicit conversion for backwards compatibility.
|
| |
| constexpr float | getRed () const |
| | 0.0f ... 1.0f
|
| |
|
void | setRed (float) |
| | 0.0f ... 1.0f
|
| |
| constexpr float | getGreen () const |
| | 0.0f ... 1.0f
|
| |
|
void | setGreen (float) |
| | 0.0f ... 1.0f
|
| |
| constexpr float | getBlue () const |
| | 0.0f ... 1.0f
|
| |
|
void | setBlue (float) |
| | 0.0f ... 1.0f
|
| |
|
uint8_t | getRed_u8 () const |
| | 0 ... 255
|
| |
|
uint8_t | getGreen_u8 () const |
| | 0 ... 255
|
| |
|
uint8_t | getBlue_u8 () const |
| | 0 ... 255
|
| |
|
| operator Color () const |
| | Conversion for backwards compatibility.
|
| |
|
| static constexpr Rgb | u8 (uint8_t red, uint8_t green, uint8_t blue) |
| |
Object representing a RGB color, new version of jngl::Color (which will be deprecated in the future)
Definition at line 21 of file Rgb.hpp.
◆ Rgb()
| Rgb |
( |
float | red, |
|
|
float | green, |
|
|
float | blue ) |
|
inlineconstexpr |
- Parameters
-
| red | 0.0f ... 1.0f |
| green | 0.0f ... 1.0f |
| blue | 0.0f ... 1.0f |
Values over 1.0f will result in 1.0f and negatives will result in 0.0f.
Definition at line 28 of file Rgb.hpp.
◆ u8()
| static constexpr Rgb u8 |
( |
uint8_t | red, |
|
|
uint8_t | green, |
|
|
uint8_t | blue ) |
|
inlinestaticconstexpr |
◆ getRed()
0.0f ... 1.0f
Definition at line 40 of file Rgb.hpp.
◆ getGreen()
0.0f ... 1.0f
Definition at line 47 of file Rgb.hpp.
◆ getBlue()
0.0f ... 1.0f
Definition at line 54 of file Rgb.hpp.
The documentation for this class was generated from the following file: