vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
Colors.hpp
Go to the documentation of this file.
1///
2/// @file Colors.hpp
3/// @brief
4/// @namespace ven
5///
6
7#pragma once
8
9#include <array>
10
11#include <vulkan/vulkan.h>
12
13namespace ven {
14
15 static constexpr float COLOR_MAX = 255.0F;
16
17 ///
18 /// @class Colors
19 /// @brief Class for colors
20 /// @namespace ven
21 ///
22 class Colors {
23
24 public:
25
26 static constexpr glm::vec3 WHITE_3 = glm::vec3(COLOR_MAX) / COLOR_MAX;
27 static constexpr glm::vec4 WHITE_4 = { 1.0F, 1.0F, 1.0F, 1.0F };
28 static constexpr VkClearColorValue WHITE_V = { { 1.0F, 1.0F, 1.0F, 1.0F } };
29
30 static constexpr glm::vec3 BLACK_3 = glm::vec3(0.0F);
31 static constexpr glm::vec4 BLACK_4 = { 0.0F, 0.0F, 0.0F, 1.0F };
32 static constexpr VkClearColorValue BLACK_V = { { 0.0F, 0.0F, 0.0F, 1.0F } };
33
34 static constexpr glm::vec3 RED_3 = glm::vec3(COLOR_MAX, 0.0F, 0.0F) / COLOR_MAX;
35 static constexpr glm::vec4 RED_4 = { 1.0F, 0.0F, 0.0F, 1.0F };
36 static constexpr VkClearColorValue RED_V = { { 1.0F, 0.0F, 0.0F, 1.0F } };
37
38 static constexpr glm::vec3 GREEN_3 = glm::vec3(0.0F, COLOR_MAX, 0.0F) / COLOR_MAX;
39 static constexpr glm::vec4 GREEN_4 = { 0.0F, 1.0F, 0.0F, 1.0F };
40 static constexpr VkClearColorValue GREEN_V = { { 0.0F, 1.0F, 0.0F, 1.0F } };
41
42 static constexpr glm::vec3 BLUE_3 = glm::vec3(0.0F, 0.0F, COLOR_MAX) / COLOR_MAX;
43 static constexpr glm::vec4 BLUE_4 = { 0.0F, 0.0F, 1.0F, 1.0F };
44 static constexpr VkClearColorValue BLUE_V = { { 0.0F, 0.0F, 1.0F, 1.0F } };
45
46 static constexpr glm::vec3 YELLOW_3 = glm::vec3(COLOR_MAX, COLOR_MAX, 0.0F) / COLOR_MAX;
47 static constexpr glm::vec4 YELLOW_4 = { 1.0F, 1.0F, 0.0F, 1.0F };
48 static constexpr VkClearColorValue YELLOW_V = { { 1.0F, 1.0F, 0.0F, 1.0F } };
49
50 static constexpr glm::vec3 CYAN_3 = glm::vec3(0.0F, COLOR_MAX, COLOR_MAX) / COLOR_MAX;
51 static constexpr glm::vec4 CYAN_4 = { 0.0F, 1.0F, 1.0F, 1.0F };
52 static constexpr VkClearColorValue CYAN_V = { { 0.0F, 1.0F, 1.0F, 1.0F } };
53
54 static constexpr glm::vec3 MAGENTA_3 = glm::vec3(COLOR_MAX, 0.0F, COLOR_MAX) / COLOR_MAX;
55 static constexpr glm::vec4 MAGENTA_4 = { 1.0F, 0.0F, 1.0F, 1.0F };
56 static constexpr VkClearColorValue MAGENTA_V = { { 1.0F, 0.0F, 1.0F, 1.0F } };
57
58 static constexpr glm::vec3 SILVER_3 = glm::vec3(192.0F, 192.0F, 192.0F) / COLOR_MAX;
59 static constexpr glm::vec4 SILVER_4 = { 0.75F, 0.75F, 0.75F, 1.0F };
60 static constexpr VkClearColorValue SILVER_V = { { 0.75F, 0.75F, 0.75F, 1.0F } };
61
62 static constexpr glm::vec3 GRAY_3 = glm::vec3(128.0F, 128.0F, 128.0F) / COLOR_MAX;
63 static constexpr glm::vec4 GRAY_4 = { 0.5F, 0.5F, 0.5F, 1.0F };
64 static constexpr VkClearColorValue GRAY_V = { { 0.5F, 0.5F, 0.5F, 1.0F } };
65
66 static constexpr glm::vec3 MAROON_3 = glm::vec3(128.0F, 0.0F, 0.0F) / COLOR_MAX;
67 static constexpr glm::vec4 MAROON_4 = { 0.5F, 0.0F, 0.0F, 1.0F };
68 static constexpr VkClearColorValue MAROON_V = { { 0.5F, 0.0F, 0.0F, 1.0F } };
69
70 static constexpr glm::vec3 OLIVE_3 = glm::vec3(128.0F, 128.0F, 0.0F) / COLOR_MAX;
71 static constexpr glm::vec4 OLIVE_4 = { 0.5F, 0.5F, 0.0F, 1.0F };
72 static constexpr VkClearColorValue OLIVE_V = { { 0.5F, 0.5F, 0.0F, 1.0F } };
73
74 static constexpr glm::vec3 LIME_3 = glm::vec3(0.0F, COLOR_MAX, 0.0F) / COLOR_MAX;
75 static constexpr glm::vec4 LIME_4 = { 0.0F, 1.0F, 0.0F, 1.0F };
76 static constexpr VkClearColorValue LIME_V = { { 0.0F, 1.0F, 0.0F, 1.0F } };
77
78 static constexpr glm::vec3 AQUA_3 = glm::vec3(0.0F, COLOR_MAX, COLOR_MAX) / COLOR_MAX;
79 static constexpr glm::vec4 AQUA_4 = { 0.0F, 1.0F, 1.0F, 1.0F };
80 static constexpr VkClearColorValue AQUA_V = { { 0.0F, 1.0F, 1.0F, 1.0F } };
81
82 static constexpr glm::vec3 TEAL_3 = glm::vec3(0.0F, 128.0F, 128.0F) / COLOR_MAX;
83 static constexpr glm::vec4 TEAL_4 = { 0.0F, 0.5F, 0.5F, 1.0F };
84 static constexpr VkClearColorValue TEAL_V = { { 0.0F, 0.5F, 0.5F, 1.0F } };
85
86 static constexpr glm::vec3 NAVY_3 = glm::vec3(0.0F, 0.0F, 128.0F) / COLOR_MAX;
87 static constexpr glm::vec4 NAVY_4 = { 0.0F, 0.0F, 0.5F, 1.0F };
88 static constexpr VkClearColorValue NAVY_V = { { 0.0F, 0.0F, 0.5F, 1.0F } };
89
90 static constexpr glm::vec3 FUCHSIA_3 = glm::vec3(COLOR_MAX, 0.0F, COLOR_MAX) / COLOR_MAX;
91 static constexpr glm::vec4 FUCHSIA_4 = { 1.0F, 0.0F, 1.0F, 1.0F };
92 static constexpr VkClearColorValue FUCHSIA_V = { { 1.0F, 0.0F, 1.0F, 1.0F } };
93
94 static constexpr glm::vec3 NIGHT_BLUE_3 = glm::vec3(25.0F, 25.0F, 112.0F) / COLOR_MAX;
95 static constexpr glm::vec4 NIGHT_BLUE_4 = { 0.098F, 0.098F, 0.439F, 1.0F };
96 static constexpr VkClearColorValue NIGHT_BLUE_V = { { 0.098F, 0.098F, 0.439F, 1.0F } };
97
98 static constexpr glm::vec3 SKY_BLUE_3 = glm::vec3(102.0F, 178.0F, 255.0F) / COLOR_MAX;
99 static constexpr glm::vec4 SKY_BLUE_4 = { 0.4F, 0.698F, 1.0F, 1.0F };
100 static constexpr VkClearColorValue SKY_BLUE_V = { { 0.4F, 0.698F, 1.0F, 1.0F } };
101
102 static constexpr glm::vec3 SUNSET_3 = glm::vec3(255.0F, 128.0F, 0.0F) / COLOR_MAX;
103 static constexpr glm::vec4 SUNSET_4 = { 1.0F, 0.5F, 0.0F, 1.0F };
104 static constexpr VkClearColorValue SUNSET_V = { { 1.0F, 0.5F, 0.0F, 1.0F } };
105
106
107 static constexpr std::array<std::pair<const char *, glm::vec3>, 20> COLOR_PRESETS_3 = {{
108 {"White", WHITE_3},
109 {"Black", BLACK_3},
110 {"Red", RED_3},
111 {"Green", GREEN_3},
112 {"Blue", BLUE_3},
113 {"Yellow", YELLOW_3},
114 {"Cyan", CYAN_3},
115 {"Magenta", MAGENTA_3},
116 {"Silver", SILVER_3},
117 {"Gray", GRAY_3},
118 {"Maroon", MAROON_3},
119 {"Olive", OLIVE_3},
120 {"Lime", LIME_3},
121 {"Aqua", AQUA_3},
122 {"Teal", TEAL_3},
123 {"Navy", NAVY_3},
124 {"Fuchsia", FUCHSIA_3},
125 {"Night Blue", NIGHT_BLUE_3},
126 {"Sky Blue", SKY_BLUE_3},
127 {"Sunset", SUNSET_3}
128 }};
129
130 static constexpr std::array<std::pair<const char *, glm::vec4>, 20> COLOR_PRESETS_4 = {{
131 {"White", WHITE_4},
132 {"Black", BLACK_4},
133 {"Red", RED_4},
134 {"Green", GREEN_4},
135 {"Blue", BLUE_4},
136 {"Yellow", YELLOW_4},
137 {"Cyan", CYAN_4},
138 {"Magenta", MAGENTA_4},
139 {"Silver", SILVER_4},
140 {"Gray", GRAY_4},
141 {"Maroon", MAROON_4},
142 {"Olive", OLIVE_4},
143 {"Lime", LIME_4},
144 {"Aqua", AQUA_4},
145 {"Teal", TEAL_4},
146 {"Navy", NAVY_4},
147 {"Fuchsia", FUCHSIA_4},
148 {"Night Blue", NIGHT_BLUE_4},
149 {"Sky Blue", SKY_BLUE_4},
150 {"Sunset", SUNSET_4}
151 }};
152
153 static constexpr std::array<std::pair<const char *, VkClearColorValue>, 20> COLOR_PRESETS_VK = {{
154 {"White", WHITE_V},
155 {"Black", BLACK_V},
156 {"Red", RED_V},
157 {"Green", GREEN_V},
158 {"Blue", BLUE_V},
159 {"Yellow", YELLOW_V},
160 {"Cyan", CYAN_V},
161 {"Magenta", MAGENTA_V},
162 {"Silver", SILVER_V},
163 {"Gray", GRAY_V},
164 {"Maroon", MAROON_V},
165 {"Olive", OLIVE_V},
166 {"Lime", LIME_V},
167 {"Aqua", AQUA_V},
168 {"Teal", TEAL_V},
169 {"Navy", NAVY_V},
170 {"Fuchsia", FUCHSIA_V},
171 {"Night Blue", NIGHT_BLUE_V},
172 {"Sky Blue", SKY_BLUE_V},
173 {"Sunset", SUNSET_V}
174 }};
175
176 }; // class Colors
177
178} // namespace ven
Class for colors.
Definition Colors.hpp:22
static constexpr VkClearColorValue BLUE_V
Definition Colors.hpp:44
static constexpr glm::vec3 AQUA_3
Definition Colors.hpp:78
static constexpr std::array< std::pair< const char *, glm::vec4 >, 20 > COLOR_PRESETS_4
Definition Colors.hpp:130
static constexpr glm::vec4 BLACK_4
Definition Colors.hpp:31
static constexpr glm::vec3 BLACK_3
Definition Colors.hpp:30
static constexpr VkClearColorValue GREEN_V
Definition Colors.hpp:40
static constexpr VkClearColorValue TEAL_V
Definition Colors.hpp:84
static constexpr glm::vec3 RED_3
Definition Colors.hpp:34
static constexpr VkClearColorValue WHITE_V
Definition Colors.hpp:28
static constexpr glm::vec4 MAROON_4
Definition Colors.hpp:67
static constexpr VkClearColorValue MAROON_V
Definition Colors.hpp:68
static constexpr glm::vec4 NAVY_4
Definition Colors.hpp:87
static constexpr glm::vec4 GRAY_4
Definition Colors.hpp:63
static constexpr VkClearColorValue MAGENTA_V
Definition Colors.hpp:56
static constexpr glm::vec4 GREEN_4
Definition Colors.hpp:39
static constexpr glm::vec4 TEAL_4
Definition Colors.hpp:83
static constexpr glm::vec3 NIGHT_BLUE_3
Definition Colors.hpp:94
static constexpr glm::vec4 SUNSET_4
Definition Colors.hpp:103
static constexpr glm::vec3 GREEN_3
Definition Colors.hpp:38
static constexpr VkClearColorValue GRAY_V
Definition Colors.hpp:64
static constexpr glm::vec3 LIME_3
Definition Colors.hpp:74
static constexpr glm::vec4 LIME_4
Definition Colors.hpp:75
static constexpr glm::vec4 AQUA_4
Definition Colors.hpp:79
static constexpr glm::vec3 SILVER_3
Definition Colors.hpp:58
static constexpr glm::vec3 GRAY_3
Definition Colors.hpp:62
static constexpr glm::vec4 CYAN_4
Definition Colors.hpp:51
static constexpr VkClearColorValue LIME_V
Definition Colors.hpp:76
static constexpr glm::vec3 OLIVE_3
Definition Colors.hpp:70
static constexpr VkClearColorValue NIGHT_BLUE_V
Definition Colors.hpp:96
static constexpr glm::vec4 RED_4
Definition Colors.hpp:35
static constexpr glm::vec4 BLUE_4
Definition Colors.hpp:43
static constexpr glm::vec4 SILVER_4
Definition Colors.hpp:59
static constexpr VkClearColorValue BLACK_V
Definition Colors.hpp:32
static constexpr VkClearColorValue SILVER_V
Definition Colors.hpp:60
static constexpr glm::vec4 MAGENTA_4
Definition Colors.hpp:55
static constexpr VkClearColorValue NAVY_V
Definition Colors.hpp:88
static constexpr glm::vec4 WHITE_4
Definition Colors.hpp:27
static constexpr glm::vec3 YELLOW_3
Definition Colors.hpp:46
static constexpr VkClearColorValue CYAN_V
Definition Colors.hpp:52
static constexpr glm::vec4 NIGHT_BLUE_4
Definition Colors.hpp:95
static constexpr glm::vec4 YELLOW_4
Definition Colors.hpp:47
static constexpr glm::vec3 MAROON_3
Definition Colors.hpp:66
static constexpr glm::vec3 FUCHSIA_3
Definition Colors.hpp:90
static constexpr glm::vec4 OLIVE_4
Definition Colors.hpp:71
static constexpr glm::vec3 BLUE_3
Definition Colors.hpp:42
static constexpr VkClearColorValue SUNSET_V
Definition Colors.hpp:104
static constexpr glm::vec3 SKY_BLUE_3
Definition Colors.hpp:98
static constexpr glm::vec3 TEAL_3
Definition Colors.hpp:82
static constexpr glm::vec3 NAVY_3
Definition Colors.hpp:86
static constexpr VkClearColorValue RED_V
Definition Colors.hpp:36
static constexpr VkClearColorValue OLIVE_V
Definition Colors.hpp:72
static constexpr VkClearColorValue SKY_BLUE_V
Definition Colors.hpp:100
static constexpr std::array< std::pair< const char *, glm::vec3 >, 20 > COLOR_PRESETS_3
Definition Colors.hpp:107
static constexpr glm::vec4 SKY_BLUE_4
Definition Colors.hpp:99
static constexpr VkClearColorValue AQUA_V
Definition Colors.hpp:80
static constexpr glm::vec4 FUCHSIA_4
Definition Colors.hpp:91
static constexpr glm::vec3 WHITE_3
Definition Colors.hpp:26
static constexpr VkClearColorValue YELLOW_V
Definition Colors.hpp:48
static constexpr glm::vec3 SUNSET_3
Definition Colors.hpp:102
static constexpr std::array< std::pair< const char *, VkClearColorValue >, 20 > COLOR_PRESETS_VK
Definition Colors.hpp:153
static constexpr VkClearColorValue FUCHSIA_V
Definition Colors.hpp:92
static constexpr glm::vec3 CYAN_3
Definition Colors.hpp:50
static constexpr glm::vec3 MAGENTA_3
Definition Colors.hpp:54
static constexpr float COLOR_MAX
Definition Colors.hpp:15