j

Dependencies:   mbed yeswecancoap C12832 LM75B

lib/Color.h

Committer:
arnedesmet
Date:
2015-10-23
Revision:
1:92958e26bf2e
Parent:
0:92d2ef9f009d

File content as of revision 1:92958e26bf2e:


#ifndef COLOR_H
#define COLOR_H

class Color{
    
    
    int red, green, blue;
    
    int floatToColorValue(float value);
    
    static const int MAX_COLOR_VALUE = 255;
    
    public:
    
    enum colors {RED = 0xFF0000,
                GREEN = 0x00FF00,
                BLUE = 0x0000FF,
                CYAN = 0x00FFFF,
                MAGENTA = 0xFF00FF,
                YELLOW = 0xFFFF00,
                WHITE = 0xFFFFFF};
    
        Color(int red, int green, int blue);
        Color(int color);
        Color(float red, float green, float blue);
        
        int getHex();
        
        int getRed();
        int getGreen();
        int getBlue();
        
    
};

#endif