ObjectivelyMVC 0.1.0
Object oriented MVC framework for OpenGL, SDL2 and GNU C
Colors.h
Go to the documentation of this file.
1/*
2 * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C.
3 * Copyright (C) 2014 Jay Dolan <jay@jaydolan.com>
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 *
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 *
21 * 3. This notice may not be removed or altered from any source distribution.
22 */
23
24#pragma once
25
27
38
39 SDL_Color AliceBlue;
40 SDL_Color AntiqueWhite;
41 SDL_Color Aqua;
42 SDL_Color Aquamarine;
43 SDL_Color Azure;
44 SDL_Color Beige;
45 SDL_Color Bisque;
46 SDL_Color Black;
47 SDL_Color BlanchedAlmond;
48 SDL_Color Blue;
49 SDL_Color BlueViolet;
50 SDL_Color Brown;
51 SDL_Color BurlyWood;
52 SDL_Color CadetBlue;
53 SDL_Color Charcoal;
54 SDL_Color Chartreuse;
55 SDL_Color Chocolate;
56 SDL_Color Coral;
57 SDL_Color CornflowerBlue;
58 SDL_Color Cornsilk;
59 SDL_Color Crimson;
60 SDL_Color Cyan;
61 SDL_Color DarkBlue;
62 SDL_Color DarkCyan;
63 SDL_Color DarkGoldenRod;
64 SDL_Color DarkGray;
65 SDL_Color DarkGrey;
66 SDL_Color DarkGreen;
67 SDL_Color DarkKhaki;
68 SDL_Color DarkMagenta;
69 SDL_Color DarkOliveGreen;
70 SDL_Color DarkOrange;
71 SDL_Color DarkOrchid;
72 SDL_Color DarkRed;
73 SDL_Color DarkSalmon;
74 SDL_Color DarkSeaGreen;
75 SDL_Color DarkSlateBlue;
76 SDL_Color DarkSlateGray;
77 SDL_Color DarkSlateGrey;
78 SDL_Color DarkTurquoise;
79 SDL_Color DarkViolet;
80 SDL_Color DeepPink;
81 SDL_Color DeepSkyBlue;
82 SDL_Color DimGray;
83 SDL_Color DimGrey;
84 SDL_Color DodgerBlue;
85 SDL_Color FireBrick;
86 SDL_Color FloralWhite;
87 SDL_Color ForestGreen;
88 SDL_Color Fuchsia;
89 SDL_Color Gainsboro;
90 SDL_Color GhostWhite;
91 SDL_Color Gold;
92 SDL_Color GoldenRod;
93 SDL_Color Gray;
94 SDL_Color Grey;
95 SDL_Color Green;
96 SDL_Color GreenYellow;
97 SDL_Color HoneyDew;
98 SDL_Color HotPink;
99 SDL_Color IndianRed;
100 SDL_Color Indigo;
101 SDL_Color Ivory;
102 SDL_Color Khaki;
103 SDL_Color Lavender;
104 SDL_Color LavenderBlush;
105 SDL_Color LawnGreen;
106 SDL_Color LemonChiffon;
107 SDL_Color LightBlue;
108 SDL_Color LightCoral;
109 SDL_Color LightCyan;
111 SDL_Color LightGray;
112 SDL_Color LightGrey;
113 SDL_Color LightGreen;
114 SDL_Color LightPink;
115 SDL_Color LightSalmon;
116 SDL_Color LightSeaGreen;
117 SDL_Color LightSkyBlue;
118 SDL_Color LightSlateGray;
119 SDL_Color LightSlateGrey;
120 SDL_Color LightSteelBlue;
121 SDL_Color LightYellow;
122 SDL_Color Lime;
123 SDL_Color LimeGreen;
124 SDL_Color Linen;
125 SDL_Color Magenta;
126 SDL_Color Maroon;
128 SDL_Color MediumBlue;
129 SDL_Color MediumOrchid;
130 SDL_Color MediumPurple;
131 SDL_Color MediumSeaGreen;
136 SDL_Color MidnightBlue;
137 SDL_Color MintCream;
138 SDL_Color MistyRose;
139 SDL_Color Moccasin;
140 SDL_Color NavajoWhite;
141 SDL_Color Navy;
142 SDL_Color OldLace;
143 SDL_Color Olive;
144 SDL_Color OliveDrab;
145 SDL_Color Orange;
146 SDL_Color OrangeRed;
147 SDL_Color Orchid;
148 SDL_Color PaleGoldenRod;
149 SDL_Color PaleGreen;
150 SDL_Color PaleTurquoise;
151 SDL_Color PaleVioletRed;
152 SDL_Color PapayaWhip;
153 SDL_Color PeachPuff;
154 SDL_Color Peru;
155 SDL_Color Pink;
156 SDL_Color Plum;
157 SDL_Color PowderBlue;
158 SDL_Color Purple;
159 SDL_Color RebeccaPurple;
160 SDL_Color Red;
161 SDL_Color RosyBrown;
162 SDL_Color RoyalBlue;
163 SDL_Color SaddleBrown;
164 SDL_Color Salmon;
165 SDL_Color SandyBrown;
166 SDL_Color SeaGreen;
167 SDL_Color SeaShell;
168 SDL_Color Sienna;
169 SDL_Color Silver;
170 SDL_Color SkyBlue;
171 SDL_Color SlateBlue;
172 SDL_Color SlateGray;
173 SDL_Color SlateGrey;
174 SDL_Color Snow;
175 SDL_Color SpringGreen;
176 SDL_Color SteelBlue;
177 SDL_Color Tan;
178 SDL_Color Teal;
179 SDL_Color Thistle;
180 SDL_Color Tomato;
181 SDL_Color Transparent;
182 SDL_Color Turquoise;
183 SDL_Color Violet;
184 SDL_Color Wheat;
185 SDL_Color White;
186 SDL_Color WhiteSmoke;
187 SDL_Color Yellow;
188 SDL_Color YellowGreen;
190
195#define MakeColor(r, g, b, a) (SDL_Color) { (r), (g), (b), (a) }
196
202OBJECTIVELYMVC_EXPORT SDL_Color MVC_ColorForName(const char *name);
203
210OBJECTIVELYMVC_EXPORT SDL_Color MVC_HexToRGBA(const char *hexString);
211
218OBJECTIVELYMVC_EXPORT char *MVC_RGBToHex(const SDL_Color *color);
219
226OBJECTIVELYMVC_EXPORT char *MVC_RGBAToHex(const SDL_Color *color);
227
236OBJECTIVELYMVC_EXPORT SDL_Color MVC_HSVToRGB(double hue, double saturation, double value);
237
246OBJECTIVELYMVC_EXPORT void MVC_RGBToHSV(const SDL_Color *color, double *hue, double *saturation, double *value);
OBJECTIVELYMVC_EXPORT const struct Colors Colors
ObjectivelyMVC base types.
#define OBJECTIVELYMVC_EXPORT
Definition: Types.h:39
W3C Color constants.
Definition: Colors.h:37
SDL_Color LightGrey
Definition: Colors.h:112
SDL_Color WhiteSmoke
Definition: Colors.h:186
SDL_Color LightBlue
Definition: Colors.h:107
SDL_Color DarkOrange
Definition: Colors.h:70
SDL_Color Gold
Definition: Colors.h:91
SDL_Color MediumBlue
Definition: Colors.h:128
SDL_Color DarkGoldenRod
Definition: Colors.h:63
SDL_Color Brown
Definition: Colors.h:50
SDL_Color LightSalmon
Definition: Colors.h:115
SDL_Color MediumSlateBlue
Definition: Colors.h:132
SDL_Color Pink
Definition: Colors.h:155
SDL_Color Lime
Definition: Colors.h:122
SDL_Color Turquoise
Definition: Colors.h:182
SDL_Color DarkTurquoise
Definition: Colors.h:78
SDL_Color Thistle
Definition: Colors.h:179
SDL_Color SlateGray
Definition: Colors.h:172
SDL_Color AliceBlue
Definition: Colors.h:39
SDL_Color Magenta
Definition: Colors.h:125
SDL_Color Fuchsia
Definition: Colors.h:88
SDL_Color SlateBlue
Definition: Colors.h:171
SDL_Color Plum
Definition: Colors.h:156
SDL_Color LavenderBlush
Definition: Colors.h:104
SDL_Color DimGray
Definition: Colors.h:82
SDL_Color DarkRed
Definition: Colors.h:72
SDL_Color LightSteelBlue
Definition: Colors.h:120
SDL_Color FloralWhite
Definition: Colors.h:86
SDL_Color SlateGrey
Definition: Colors.h:173
SDL_Color MidnightBlue
Definition: Colors.h:136
SDL_Color ForestGreen
Definition: Colors.h:87
SDL_Color DarkViolet
Definition: Colors.h:79
SDL_Color DarkCyan
Definition: Colors.h:62
SDL_Color White
Definition: Colors.h:185
SDL_Color Crimson
Definition: Colors.h:59
SDL_Color Aquamarine
Definition: Colors.h:42
SDL_Color PowderBlue
Definition: Colors.h:157
SDL_Color SteelBlue
Definition: Colors.h:176
SDL_Color BlanchedAlmond
Definition: Colors.h:47
SDL_Color Azure
Definition: Colors.h:43
SDL_Color Tan
Definition: Colors.h:177
SDL_Color Green
Definition: Colors.h:95
SDL_Color Wheat
Definition: Colors.h:184
SDL_Color Coral
Definition: Colors.h:56
SDL_Color Tomato
Definition: Colors.h:180
SDL_Color MintCream
Definition: Colors.h:137
OBJECTIVELYMVC_EXPORT void MVC_RGBToHSV(const SDL_Color *color, double *hue, double *saturation, double *value)
Converts the given RGB color to HSV components.
Definition: Colors.c:732
SDL_Color Navy
Definition: Colors.h:141
SDL_Color NavajoWhite
Definition: Colors.h:140
SDL_Color LightSlateGray
Definition: Colors.h:118
SDL_Color Snow
Definition: Colors.h:174
SDL_Color Gainsboro
Definition: Colors.h:89
SDL_Color PaleTurquoise
Definition: Colors.h:150
SDL_Color Lavender
Definition: Colors.h:103
SDL_Color RosyBrown
Definition: Colors.h:161
SDL_Color DeepSkyBlue
Definition: Colors.h:81
SDL_Color Maroon
Definition: Colors.h:126
SDL_Color LightPink
Definition: Colors.h:114
SDL_Color CadetBlue
Definition: Colors.h:52
SDL_Color RebeccaPurple
Definition: Colors.h:159
SDL_Color DarkSeaGreen
Definition: Colors.h:74
SDL_Color DarkGray
Definition: Colors.h:64
SDL_Color Cornsilk
Definition: Colors.h:58
OBJECTIVELYMVC_EXPORT SDL_Color MVC_HexToRGBA(const char *hexString)
Converts the given hexadecimal color string to an RGBA color.
Definition: Colors.c:638
SDL_Color RoyalBlue
Definition: Colors.h:162
SDL_Color LightSkyBlue
Definition: Colors.h:117
SDL_Color Ivory
Definition: Colors.h:101
SDL_Color Cyan
Definition: Colors.h:60
SDL_Color DodgerBlue
Definition: Colors.h:84
SDL_Color PeachPuff
Definition: Colors.h:153
SDL_Color DarkGrey
Definition: Colors.h:65
SDL_Color Linen
Definition: Colors.h:124
SDL_Color Salmon
Definition: Colors.h:164
SDL_Color DarkSlateGray
Definition: Colors.h:76
SDL_Color GreenYellow
Definition: Colors.h:96
SDL_Color DarkKhaki
Definition: Colors.h:67
OBJECTIVELYMVC_EXPORT char * MVC_RGBAToHex(const SDL_Color *color)
Definition: Colors.c:674
SDL_Color LightSlateGrey
Definition: Colors.h:119
SDL_Color Charcoal
Definition: Colors.h:53
SDL_Color Yellow
Definition: Colors.h:187
SDL_Color Blue
Definition: Colors.h:48
SDL_Color MediumOrchid
Definition: Colors.h:129
SDL_Color DimGrey
Definition: Colors.h:83
SDL_Color PaleGoldenRod
Definition: Colors.h:148
SDL_Color Violet
Definition: Colors.h:183
SDL_Color GhostWhite
Definition: Colors.h:90
SDL_Color Sienna
Definition: Colors.h:168
SDL_Color DarkSlateGrey
Definition: Colors.h:77
SDL_Color GoldenRod
Definition: Colors.h:92
SDL_Color LightGreen
Definition: Colors.h:113
SDL_Color SaddleBrown
Definition: Colors.h:163
SDL_Color CornflowerBlue
Definition: Colors.h:57
SDL_Color Chartreuse
Definition: Colors.h:54
SDL_Color FireBrick
Definition: Colors.h:85
SDL_Color Transparent
Definition: Colors.h:181
SDL_Color LawnGreen
Definition: Colors.h:105
SDL_Color Indigo
Definition: Colors.h:100
SDL_Color MediumTurquoise
Definition: Colors.h:134
SDL_Color Olive
Definition: Colors.h:143
SDL_Color MediumSpringGreen
Definition: Colors.h:133
SDL_Color Purple
Definition: Colors.h:158
SDL_Color DarkSalmon
Definition: Colors.h:73
SDL_Color DeepPink
Definition: Colors.h:80
SDL_Color OliveDrab
Definition: Colors.h:144
SDL_Color LightCoral
Definition: Colors.h:108
SDL_Color LightGray
Definition: Colors.h:111
SDL_Color Black
Definition: Colors.h:46
SDL_Color Orange
Definition: Colors.h:145
SDL_Color SeaShell
Definition: Colors.h:167
SDL_Color Peru
Definition: Colors.h:154
SDL_Color LightSeaGreen
Definition: Colors.h:116
SDL_Color MediumVioletRed
Definition: Colors.h:135
SDL_Color SpringGreen
Definition: Colors.h:175
SDL_Color PapayaWhip
Definition: Colors.h:152
SDL_Color LightGoldenRodYellow
Definition: Colors.h:110
SDL_Color Aqua
Definition: Colors.h:41
SDL_Color DarkSlateBlue
Definition: Colors.h:75
SDL_Color Beige
Definition: Colors.h:44
SDL_Color MediumPurple
Definition: Colors.h:130
SDL_Color LightYellow
Definition: Colors.h:121
SDL_Color DarkOliveGreen
Definition: Colors.h:69
SDL_Color HotPink
Definition: Colors.h:98
SDL_Color LimeGreen
Definition: Colors.h:123
SDL_Color MediumSeaGreen
Definition: Colors.h:131
SDL_Color Gray
Definition: Colors.h:93
SDL_Color PaleVioletRed
Definition: Colors.h:151
SDL_Color SandyBrown
Definition: Colors.h:165
SDL_Color DarkOrchid
Definition: Colors.h:71
SDL_Color AntiqueWhite
Definition: Colors.h:40
OBJECTIVELYMVC_EXPORT SDL_Color MVC_ColorForName(const char *name)
Definition: Colors.c:180
SDL_Color Silver
Definition: Colors.h:169
SDL_Color Teal
Definition: Colors.h:178
SDL_Color DarkGreen
Definition: Colors.h:66
SDL_Color BlueViolet
Definition: Colors.h:49
SDL_Color OldLace
Definition: Colors.h:142
SDL_Color Khaki
Definition: Colors.h:102
SDL_Color Chocolate
Definition: Colors.h:55
SDL_Color Moccasin
Definition: Colors.h:139
SDL_Color IndianRed
Definition: Colors.h:99
SDL_Color MediumAquaMarine
Definition: Colors.h:127
SDL_Color LemonChiffon
Definition: Colors.h:106
SDL_Color HoneyDew
Definition: Colors.h:97
OBJECTIVELYMVC_EXPORT char * MVC_RGBToHex(const SDL_Color *color)
Definition: Colors.c:670
SDL_Color Orchid
Definition: Colors.h:147
SDL_Color Bisque
Definition: Colors.h:45
SDL_Color LightCyan
Definition: Colors.h:109
SDL_Color YellowGreen
Definition: Colors.h:188
SDL_Color PaleGreen
Definition: Colors.h:149
SDL_Color OrangeRed
Definition: Colors.h:146
SDL_Color BurlyWood
Definition: Colors.h:51
OBJECTIVELYMVC_EXPORT SDL_Color MVC_HSVToRGB(double hue, double saturation, double value)
Converts the given HSV components to an RGB color.
Definition: Colors.c:684
SDL_Color DarkMagenta
Definition: Colors.h:68
SDL_Color SeaGreen
Definition: Colors.h:166
SDL_Color DarkBlue
Definition: Colors.h:61
SDL_Color Grey
Definition: Colors.h:94
SDL_Color MistyRose
Definition: Colors.h:138
SDL_Color SkyBlue
Definition: Colors.h:170
SDL_Color Red
Definition: Colors.h:160