VEX V5 C++ API
|
Use the color class to create Color objects. More...
Public Member Functions | |
color () | |
color (int value) | |
Creates a color. More... | |
color (uint8_t r, uint8_t g, uint8_t b) | |
Creates a color using red, green, and blue values. More... | |
~color () | |
uint32_t | rgb (uint32_t value) |
uint32_t | rgb (uint8_t r, uint8_t g, uint8_t b) |
void | operator= (uint32_t value) |
uint32_t | rgb () const |
operator uint32_t () const | |
bool | isTransparent () const |
Gets the state of the color's transparency. More... | |
color & | hsv (uint32_t hue, double sat, double value) |
Creates a color using hue, saturation, and brightness values. More... | |
color & | web (const char *color) |
Creates a color using a hexadecimal value. More... | |
Static Public Attributes | |
static const color | black |
Represents the color black. More... | |
static const color | white |
Represents the color white. More... | |
static const color | red |
Represents the color red. More... | |
static const color | green |
Represents the color green. More... | |
static const color | blue |
Represents the color blue. More... | |
static const color | yellow |
Represents the color yellow. More... | |
static const color | orange |
Represents the color orange. More... | |
static const color | purple |
Represents the color purple. More... | |
static const color | cyan |
Represents the color cyan. More... | |
static const color | transparent |
Represents the color transparent. More... | |
Use the color class to create Color objects.
vex::color::color | ( | ) |
vex::color::color | ( | int | value | ) |
Creates a color.
value | The value of the color. |
vex::color::color | ( | uint8_t | r, |
uint8_t | g, | ||
uint8_t | b | ||
) |
Creates a color using red, green, and blue values.
r | the color of red on a scale of 0 to 255. |
g | the color of green on a scale of 0 to 255. |
b | the color of blue on a scale of 0 to 255. |
vex::color::~color | ( | ) |
uint32_t vex::color::rgb | ( | uint32_t | value | ) |
uint32_t vex::color::rgb | ( | uint8_t | r, |
uint8_t | g, | ||
uint8_t | b | ||
) |
void vex::color::operator= | ( | uint32_t | value | ) |
uint32_t vex::color::rgb | ( | ) | const |
vex::color::operator uint32_t | ( | ) | const |
bool vex::color::isTransparent | ( | ) | const |
Gets the state of the color's transparency.
color& vex::color::hsv | ( | uint32_t | hue, |
double | sat, | ||
double | value | ||
) |
Creates a color using hue, saturation, and brightness values.
hue | An integer from 0 to 360 that represents the hue of the color. |
sat | A double from 0.0 to 1.0 that represents the saturation of the color. |
value | A double from 0.0 to 1.0 that represents the brightness of the color. |
color& vex::color::web | ( | const char * | color | ) |
Creates a color using a hexadecimal value.
color | A hexadecimal or web color value that defines a specific color. |
|
static |
Represents the color black.
|
static |
Represents the color white.
|
static |
Represents the color red.
|
static |
Represents the color green.
|
static |
Represents the color blue.
|
static |
Represents the color yellow.
|
static |
Represents the color orange.
|
static |
Represents the color purple.
|
static |
Represents the color cyan.
|
static |
Represents the color transparent.