Mountain
1.0.0
Simple C++ 2D Game Framework
|
The ColorHsva struct represents a color in HSVA color space. More...
#include <color.hpp>
Public Member Functions | |
constexpr | ColorHsva (const float_t h, const float_t s, const float_t v, const float_t a=1.f) |
Constructs a color with each specified component. More... | |
constexpr | operator Color () const |
Converts the ColorHsva to a Color. | |
constexpr | operator Vector3 () const |
Converts the ColorHsva to a Vector3. | |
constexpr | operator Vector4 () const |
Converts the ColorHsva to a Vector4. | |
Static Public Member Functions | |
static constexpr ColorHsva | White () |
Constant for white. More... | |
static constexpr ColorHsva | Gray () |
Constant for gray. More... | |
static constexpr ColorHsva | Black () |
Constant for black. More... | |
static constexpr ColorHsva | Red () |
Constant for red. More... | |
static constexpr ColorHsva | Green () |
Constant for green. More... | |
static constexpr ColorHsva | Blue () |
Constant for blue. More... | |
static constexpr ColorHsva | Yellow () |
Constant for yellow. More... | |
static constexpr ColorHsva | LightBlue () |
Constant for cyan. More... | |
static constexpr ColorHsva | Magenta () |
Constant for magenta. More... | |
Public Attributes | |
float_t | h = 0 |
Hue component. | |
float_t | s = 0 |
Saturation component. | |
float_t | v = 0 |
Value component. | |
float_t | a = 1.f |
Alpha component. | |
The ColorHsva struct represents a color in HSVA color space.
It uses values from 0 to 1. The default alpha value is 1.
constexpr Mountain::ColorHsva::ColorHsva | ( | const float_t | h, |
const float_t | s, | ||
const float_t | v, | ||
const float_t | a = 1.f |
||
) |
Constructs a color with each specified component.
h | Hue component |
s | Saturation component |
v | Value component |
a | Alpha component |
|
static |
Constant for cyan.
|
static |
Constant for magenta.