Four [0..255] components defined color.
More...
#include <color.hpp>
|
| Color () |
| Create a white color.
|
|
| Color (unsigned char r, unsigned char g, unsigned char b) |
| Create a color with an alpha of 255. More...
|
|
| Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Create a color with a custom alpha. More...
|
|
Color & | operator= (const Color &color) |
| Affect a color into another. More...
|
|
glm::vec4 | toFloat () |
| Convert the color to a float format (between 0 and 1). More...
|
|
|
unsigned char | r |
| Red component.
|
|
unsigned char | g |
| Green component.
|
|
unsigned char | b |
| Blue component.
|
|
unsigned char | a |
| Alpha component.
|
|
|
static Color | White = Color(255, 255, 255) |
| White color.
|
|
static Color | Black = Color(0, 0, 0) |
| Black color.
|
|
static Color | Red = Color(255, 0, 0) |
| Red color.
|
|
static Color | Green = Color(0, 255, 0) |
| Green color.
|
|
static Color | Blue = Color(0, 0, 255) |
| Blue color.
|
|
Four [0..255] components defined color.
Definition at line 32 of file color.hpp.
hx3d::graphics::Color::Color |
( |
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b |
|
) |
| |
Create a color with an alpha of 255.
- Parameters
-
Definition at line 28 of file color.cpp.
hx3d::graphics::Color::Color |
( |
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a |
|
) |
| |
Create a color with a custom alpha.
- Parameters
-
Definition at line 30 of file color.cpp.
Color hx3d::graphics::Color::hsvToRgb |
( |
Color |
hsv | ) |
|
|
static |
Convert HSV color to RGB format.
- Parameters
-
- Returns
- RGB color
Definition at line 46 of file color.cpp.
Color & hx3d::graphics::Color::operator= |
( |
const Color & |
color | ) |
|
Affect a color into another.
- Parameters
-
- Returns
- Color
Definition at line 33 of file color.cpp.
Color hx3d::graphics::Color::rgbToHsv |
( |
Color |
rgb | ) |
|
|
static |
Convert RGB color to HSV format.
- Parameters
-
- Returns
- HSV color
Definition at line 91 of file color.cpp.
glm::vec4 hx3d::graphics::Color::toFloat |
( |
| ) |
|
Convert the color to a float format (between 0 and 1).
- Returns
- Color (vec4)
Definition at line 42 of file color.cpp.
The documentation for this class was generated from the following files: