daisy::Color¶
#include <color.h>
Public Types¶
Name | |
---|---|
enum | PresetColor |
Public Functions¶
Name | |
---|---|
Color() | |
~Color() | |
void | Init(PresetColor c) |
void | Init(float red, float green, float blue) |
float | Red() const |
float | Green() const |
float | Blue() const |
uint8_t | Red8() const |
uint8_t | Green8() const |
uint8_t | Blue8() const |
Color | operator*(float scale) |
Detailed Description¶
Class for handling simple colors
Public Types Documentation¶
enum PresetColor¶
Enumerator | Value | Description |
---|---|---|
RED | & | |
GREEN | & | |
BLUE | & | |
WHITE | & | |
PURPLE | & | |
CYAN | & | |
GOLD | & | |
OFF | & | |
LAST | & |
List of colors that have a preset RGB value
Public Functions Documentation¶
function Color¶
function ~Color¶
function Init¶
Parameters:
- c Color to init to
Initializes the Color with a given preset.
function Init¶
Parameters:
- red Red value
- green Green value
- blue Blue value
Initializes the Color with a specific RGB value red, green, and blue should be floats between 0 and 1
function Red¶
Returns the 0-1 value for Red
function Green¶
Returns the 0-1 value for Green
function Blue¶
Returns the 0-1 value for Blue
function Red8¶
function Green8¶
function Blue8¶
function operator*¶
Returns a scaled color by a float
---¶
Updated on 2024-01-03 at 19:41:01 +0000