RGBA color representation.
More...
#include <utilities/Color.hpp>
|
| Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a) |
| Create color with all channels.
|
|
| Color (uint8_t r, uint8_t g, uint8_t b) |
| Create opaque color.
|
|
| Color (uint8_t v) |
| Create grayscale color.
|
|
| Color () |
| Create white color.
|
|
const float * | data () const |
| Get color as float array.
|
|
|
uint8_t | r |
| Red channel (0-255)
|
|
uint8_t | g |
| Green channel (0-255)
|
|
uint8_t | b |
| Blue channel (0-255)
|
|
uint8_t | a |
| Alpha channel (0-255)
|
|
RGBA color representation.
Stores color data with 8 bits per channel. Provides conversions between byte and float formats.
◆ Color() [1/3]
StevEngine::Utilities::Color::Color |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b, |
|
|
uint8_t | a ) |
|
inline |
Create color with all channels.
- Parameters
-
r | Red value |
g | Green value |
b | Blue value |
a | Alpha value |
◆ Color() [2/3]
StevEngine::Utilities::Color::Color |
( |
uint8_t | r, |
|
|
uint8_t | g, |
|
|
uint8_t | b ) |
|
inline |
Create opaque color.
- Parameters
-
r | Red value |
g | Green value |
b | Blue value |
◆ Color() [3/3]
StevEngine::Utilities::Color::Color |
( |
uint8_t | v | ) |
|
|
inline |
Create grayscale color.
- Parameters
-
◆ data()
const float * StevEngine::Utilities::Color::data |
( |
| ) |
const |
Get color as float array.
- Returns
- Array of normalized float values [r,g,b,a]
The documentation for this struct was generated from the following files: