Class daisy::Color¶
#include <color.h>
Public Types¶
Type | Name |
---|---|
enum | PresetColor |
Public Functions¶
Type | Name |
---|---|
float | Blue () const |
uint8_t | Blue8 () const |
Color () |
|
Color (float r, float g, float b) |
|
float | Green () const |
uint8_t | Green8 () const |
void | Init (PresetColor c) |
void | Init (float red, float green, float blue) |
float | Red () const |
uint8_t | Red8 () const |
void | SetBlue (const float amt) |
void | SetGreen (const float amt) |
void | SetRed (const float amt) |
Color | operator* (float scale) |
Color | operator+ (Color rhs) |
~Color () |
Public Static Functions¶
Type | Name |
---|---|
Color | Blend (const Color a, const Color b, const float amt) |
Detailed Description¶
Class for handling simple colors
Public Types Documentation¶
enum PresetColor¶
List of colors that have a preset RGB value
Public Functions Documentation¶
function Blue¶
Returns the 0-1 value for Blue
function Blue8¶
function Color [½]¶
function Color [2/2]¶
function Green¶
Returns the 0-1 value for Green
function Green8¶
function Init [½]¶
Initializes the Color with a given preset.
Parameters:
c
Color to init to
function Init [2/2]¶
Initializes the Color with a specific RGB value red, green, and blue should be floats between 0 and 1
Parameters:
red
Red valuegreen
Green valueblue
Blue value
function Red¶
Returns the 0-1 value for Red
function Red8¶
function SetBlue¶
function SetGreen¶
function SetRed¶
function operator*¶
Returns a scaled color by a float
function operator+¶
Adds another color to this one, destructively saturating at 1
function ~Color¶
Public Static Functions Documentation¶
function Blend¶
Returns a color that is blended between a and b
The documentation for this class was generated from the following file external-docs/libDaisy/src/util/color.h