Statistics
| Branch: | Tag: | Revision:

amiro-os / include / amiro / Color.h @ f3972840

History | View | Annotate | Download (3.06 KB)

1
#ifndef AMIRO_COLOR_H_
2
#define AMIRO_COLOR_H_
3

    
4
namespace amiro {
5

    
6
  class Color {
7
  public:
8
    enum GlobalColor {
9
      ALICEBLUE,
10
      ANTIQUEWHITE,
11
      AQUA,
12
      AQUAMARINE,
13
      AZURE,
14
      BEIGE,
15
      BISQUE,
16
      BLACK,
17
      BLANCHEDALMOND,
18
      BLUE,
19
      BLUEVIOLET,
20
      BROWN,
21
      BURLYWOOD,
22
      CADETBLUE,
23
      CHARTREUSE,
24
      CHOCOLATE,
25
      CORAL,
26
      CORNFLOWERBLUE,
27
      CORNSILK,
28
      CRIMSON,
29
      CYAN,
30
      DARKBLUE,
31
      DARKCYAN,
32
      DARKGOLDENROD,
33
      DARKGRAY,
34
      DARKGREEN,
35
      DARKGREY,
36
      DARKKHAKI,
37
      DARKMAGENTA,
38
      DARKOLIVEGREEN,
39
      DARKORANGE,
40
      DARKORCHID,
41
      DARKRED,
42
      DARKSALMON,
43
      DARKSEAGREEN,
44
      DARKSLATEBLUE,
45
      DARKSLATEGRAY,
46
      DARKSLATEGREY,
47
      DARKTURQUOISE,
48
      DARKVIOLET,
49
      DEEPPINK,
50
      DEEPSKYBLUE,
51
      DIMGRAY,
52
      DIMGREY,
53
      DODGERBLUE,
54
      FIREBRICK,
55
      FLORALWHITE,
56
      FORESTGREEN,
57
      FUCHSIA,
58
      GAINSBORO,
59
      GHOSTWHITE,
60
      GOLD,
61
      GOLDENROD,
62
      GRAY,
63
      GREY,
64
      GREEN,
65
      GREENYELLOW,
66
      HONEYDEW,
67
      HOTPINK,
68
      INDIANRED,
69
      INDIGO,
70
      IVORY,
71
      KHAKI,
72
      LAVENDER,
73
      LAVENDERBLUSH,
74
      LAWNGREEN,
75
      LEMONCHIFFON,
76
      LIGHTBLUE,
77
      LIGHTCORAL,
78
      LIGHTCYAN,
79
      LIGHTGOLDENRODYELLOW,
80
      LIGHTGRAY,
81
      LIGHTGREEN,
82
      LIGHTGREY,
83
      LIGHTPINK,
84
      LIGHTSALMON,
85
      LIGHTSEAGREEN,
86
      LIGHTSKYBLUE,
87
      LIGHTSLATEGRAY,
88
      LIGHTSLATEGREY,
89
      LIGHTSTEELBLUE,
90
      LIGHTYELLOW,
91
      LIME,
92
      LIMEGREEN,
93
      LINEN,
94
      MAGENTA,
95
      MAROON,
96
      MEDIUMAQUAMARINE,
97
      MEDIUMBLUE,
98
      MEDIUMORCHID,
99
      MEDIUMPURPLE,
100
      MEDIUMSEAGREEN,
101
      MEDIUMSLATEBLUE,
102
      MEDIUMSPRINGGREEN,
103
      MEDIUMTURQUOISE,
104
      MEDIUMVIOLETRED,
105
      MIDNIGHTBLUE,
106
      MINTCREAM,
107
      MISTYROSE,
108
      MOCCASIN,
109
      NAVAJOWHITE,
110
      NAVY,
111
      OLDLACE,
112
      OLIVE,
113
      OLIVEDRAB,
114
      ORANGE,
115
      ORANGERED,
116
      ORCHID,
117
      PALEGOLDENROD,
118
      PALEGREEN,
119
      PALETURQUOISE,
120
      PALEVIOLETRED,
121
      PAPAYAWHIP,
122
      PEACHPUFF,
123
      PERU,
124
      PINK,
125
      PLUM,
126
      POWDERBLUE,
127
      PURPLE,
128
      RED,
129
      ROSYBROWN,
130
      ROYALBLUE,
131
      SADDLEBROWN,
132
      SALMON,
133
      SANDYBROWN,
134
      SEAGREEN,
135
      SEASHELL,
136
      SIENNA,
137
      SILVER,
138
      SKYBLUE,
139
      SLATEBLUE,
140
      SLATEGRAY,
141
      SLATEGREY,
142
      SNOW,
143
      SPRINGGREEN,
144
      STEELBLUE,
145
      TAN,
146
      TEAL,
147
      THISTLE,
148
      TOMATO,
149
      TURQUOISE,
150
      VIOLET,
151
      WHEAT,
152
      WHITE,
153
      WHITESMOKE,
154
      YELLOW,
155
      YELLOWGREEN
156
    };
157

    
158
    Color();
159
    Color(const Color& color);
160
    Color(int r, int g, int b);
161
    Color(GlobalColor color);
162
    Color darker(int factor);
163
    void getRedGreenBlue(int* r, int* g, int* b);
164
    int getRed();
165
    int getGreen();
166
    int getBlue();
167
    Color lighter(int factor);
168
    void setRedGreenBlue(int r, int g, int b);
169

    
170
    Color& operator=(Color const& color);
171
    Color& operator=(GlobalColor color);
172

    
173
  private:
174
    unsigned char red;
175
    unsigned char green;
176
    unsigned char blue;
177
  };
178

    
179
}
180

    
181
#endif /* AMIRO_COLOR_H_ */