Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
color.h
- Committer:
- ciryk
- Date:
- 2015-12-10
- Revision:
- 0:44d0a336da9d
- Child:
- 7:c99e1708714f
File content as of revision 0:44d0a336da9d:
#ifndef COLOR_H
#define COLOR_H
class Color
{
public:
enum colors {
RED= 0xFF0000,
GREEN = 0x00FF00,
BLUE = 0x0000FF,
CYAN = 0x00FFFF,
MAGENTA = 0xFF00FF,
YELLOW = 0xFFFFFF,
WHITE = 0xFFFFFF,
PINK = 0xFF69B4
};
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();
private:
int red;
int blue;
int green;
int color;
int floatToColorValue(float value);
static const int MAX_COLOR_VALUE = 255;
};
#endif