RGB-Led driver, used to handle convertions between HEX and integer to regulate LEDS through the embed.

Embed: (wiki syntax)

« Back to documentation index

Color Class Reference

Color Class Reference

Color class A Color class to manage the colors, from HEX to RGB or int. More...

#include <color.h>

Public Types

enum  colors
 

enum of colors

More...

Public Member Functions

 Color (int red, int green, int blue)
 Color instance with red, green, blue as integers.
 Color (int color)
 Color instance with an integer.
 Color (float red, float green, float blue)
 Color instance with red, green, blue as floats.
int getHex ()
 getHex method Returns the color as a Hex
int getRed ()
 getRed method Returns the color red as an integer
int getGreen ()
 getGreen method Returns the color green as an integer
int getBlue ()
 getBlue method Returns the color blue as an integer

Detailed Description

Color class A Color class to manage the colors, from HEX to RGB or int.

Definition at line 6 of file color.h.


Member Enumeration Documentation

enum colors

enum of colors

Definition at line 11 of file color.h.


Constructor & Destructor Documentation

Color ( int  red,
int  green,
int  blue 
)

Color instance with red, green, blue as integers.

Definition at line 3 of file color.cpp.

Color ( int  color )

Color instance with an integer.

Definition at line 9 of file color.cpp.

Color ( float  red,
float  green,
float  blue 
)

Color instance with red, green, blue as floats.

Definition at line 15 of file color.cpp.


Member Function Documentation

int getBlue (  )

getBlue method Returns the color blue as an integer

Definition at line 31 of file color.cpp.

int getGreen (  )

getGreen method Returns the color green as an integer

Definition at line 28 of file color.cpp.

int getHex (  )

getHex method Returns the color as a Hex

Definition at line 34 of file color.cpp.

int getRed (  )

getRed method Returns the color red as an integer

Definition at line 25 of file color.cpp.