Alexander De Geeter
/
RGB-LED
voor rian
Diff: lib/color.h
- Revision:
- 0:ff4d23667e75
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/color.h Fri Oct 23 08:36:18 2015 +0000 @@ -0,0 +1,36 @@ + + +#ifndef COLOR_H +#define COLOR_H + +class Color { + + + public: + Color(int red, int green, int blue); + Color(int color); + Color(float red, float green, float blue); + int getRed(); + int getGreen(); + int getBlue(); + int getHex(); + int floatToColorValue(float value); + static const int MAX_COLOR = 255; + enum colors { + RED = 0xFF0000, + GREEN= 0x00FF00, + BLUE= 0x0000FF, + CYAN= 0xFFFF00, + MAGENTA= 0xFF00FF, + YELLOW= 0xFFFF00, + WHITE= 0xFFFFFF, + PINK=0xFF69B4 + }; + private: + int red, green, blue; + + + +}; + +#endif \ No newline at end of file