45constexpr float magma[256][3] = { { 0.001462f, 0.000466f, 0.013866f },
46 {0.002258f, 0.001295f, 0.018331f},
47 {0.003279f, 0.002305f, 0.023708f},
48 {0.004512f, 0.003490f, 0.029965f},
49 {0.005950f, 0.004843f, 0.037130f},
50 {0.007588f, 0.006356f, 0.044973f},
51 {0.009426f, 0.008022f, 0.052844f},
52 {0.011465f, 0.009828f, 0.060750f},
53 {0.013708f, 0.011771f, 0.068667f},
54 {0.016156f, 0.013840f, 0.076603f},
55 {0.018815f, 0.016026f, 0.084584f},
56 {0.021692f, 0.018320f, 0.092610f},
57 {0.024792f, 0.020715f, 0.100676f},
58 {0.028123f, 0.023201f, 0.108787f},
59 {0.031696f, 0.025765f, 0.116965f},
60 {0.035520f, 0.028397f, 0.125209f},
61 {0.039608f, 0.031090f, 0.133515f},
62 {0.043830f, 0.033830f, 0.141886f},
63 {0.048062f, 0.036607f, 0.150327f},
64 {0.052320f, 0.039407f, 0.158841f},
65 {0.056615f, 0.042160f, 0.167446f},
66 {0.060949f, 0.044794f, 0.176129f},
67 {0.065330f, 0.047318f, 0.184892f},
68 {0.069764f, 0.049726f, 0.193735f},
69 {0.074257f, 0.052017f, 0.202660f},
70 {0.078815f, 0.054184f, 0.211667f},
71 {0.083446f, 0.056225f, 0.220755f},
72 {0.088155f, 0.058133f, 0.229922f},
73 {0.092949f, 0.059904f, 0.239164f},
74 {0.097833f, 0.061531f, 0.248477f},
75 {0.102815f, 0.063010f, 0.257854f},
76 {0.107899f, 0.064335f, 0.267289f},
77 {0.113094f, 0.065492f, 0.276784f},
78 {0.118405f, 0.066479f, 0.286321f},
79 {0.123833f, 0.067295f, 0.295879f},
80 {0.129380f, 0.067935f, 0.305443f},
81 {0.135053f, 0.068391f, 0.315000f},
82 {0.140858f, 0.068654f, 0.324538f},
83 {0.146785f, 0.068738f, 0.334011f},
84 {0.152839f, 0.068637f, 0.343404f},
85 {0.159018f, 0.068354f, 0.352688f},
86 {0.165308f, 0.067911f, 0.361816f},
87 {0.171713f, 0.067305f, 0.370771f},
88 {0.178212f, 0.066576f, 0.379497f},
89 {0.184801f, 0.065732f, 0.387973f},
90 {0.191460f, 0.064818f, 0.396152f},
91 {0.198177f, 0.063862f, 0.404009f},
92 {0.204935f, 0.062907f, 0.411514f},
93 {0.211718f, 0.061992f, 0.418647f},
94 {0.218512f, 0.061158f, 0.425392f},
95 {0.225302f, 0.060445f, 0.431742f},
96 {0.232077f, 0.059889f, 0.437695f},
97 {0.238826f, 0.059517f, 0.443256f},
98 {0.245543f, 0.059352f, 0.448436f},
99 {0.252220f, 0.059415f, 0.453248f},
100 {0.258857f, 0.059706f, 0.457710f},
101 {0.265447f, 0.060237f, 0.461840f},
102 {0.271994f, 0.060994f, 0.465660f},
103 {0.278493f, 0.061978f, 0.469190f},
104 {0.284951f, 0.063168f, 0.472451f},
105 {0.291366f, 0.064553f, 0.475462f},
106 {0.297740f, 0.066117f, 0.478243f},
107 {0.304081f, 0.067835f, 0.480812f},
108 {0.310382f, 0.069702f, 0.483186f},
109 {0.316654f, 0.071690f, 0.485380f},
110 {0.322899f, 0.073782f, 0.487408f},
111 {0.329114f, 0.075972f, 0.489287f},
112 {0.335308f, 0.078236f, 0.491024f},
113 {0.341482f, 0.080564f, 0.492631f},
114 {0.347636f, 0.082946f, 0.494121f},
115 {0.353773f, 0.085373f, 0.495501f},
116 {0.359898f, 0.087831f, 0.496778f},
117 {0.366012f, 0.090314f, 0.497960f},
118 {0.372116f, 0.092816f, 0.499053f},
119 {0.378211f, 0.095332f, 0.500067f},
120 {0.384299f, 0.097855f, 0.501002f},
121 {0.390384f, 0.100379f, 0.501864f},
122 {0.396467f, 0.102902f, 0.502658f},
123 {0.402548f, 0.105420f, 0.503386f},
124 {0.408629f, 0.107930f, 0.504052f},
125 {0.414709f, 0.110431f, 0.504662f},
126 {0.420791f, 0.112920f, 0.505215f},
127 {0.426877f, 0.115395f, 0.505714f},
128 {0.432967f, 0.117855f, 0.506160f},
129 {0.439062f, 0.120298f, 0.506555f},
130 {0.445163f, 0.122724f, 0.506901f},
131 {0.451271f, 0.125132f, 0.507198f},
132 {0.457386f, 0.127522f, 0.507448f},
133 {0.463508f, 0.129893f, 0.507652f},
134 {0.469640f, 0.132245f, 0.507809f},
135 {0.475780f, 0.134577f, 0.507921f},
136 {0.481929f, 0.136891f, 0.507989f},
137 {0.488088f, 0.139186f, 0.508011f},
138 {0.494258f, 0.141462f, 0.507988f},
139 {0.500438f, 0.143719f, 0.507920f},
140 {0.506629f, 0.145958f, 0.507806f},
141 {0.512831f, 0.148179f, 0.507648f},
142 {0.519045f, 0.150383f, 0.507443f},
143 {0.525270f, 0.152569f, 0.507192f},
144 {0.531507f, 0.154739f, 0.506895f},
145 {0.537755f, 0.156894f, 0.506551f},
146 {0.544015f, 0.159033f, 0.506159f},
147 {0.550287f, 0.161158f, 0.505719f},
148 {0.556571f, 0.163269f, 0.505230f},
149 {0.562866f, 0.165368f, 0.504692f},
150 {0.569172f, 0.167454f, 0.504105f},
151 {0.575490f, 0.169530f, 0.503466f},
152 {0.581819f, 0.171596f, 0.502777f},
153 {0.588158f, 0.173652f, 0.502035f},
154 {0.594508f, 0.175701f, 0.501241f},
155 {0.600868f, 0.177743f, 0.500394f},
156 {0.607238f, 0.179779f, 0.499492f},
157 {0.613617f, 0.181811f, 0.498536f},
158 {0.620005f, 0.183840f, 0.497524f},
159 {0.626401f, 0.185867f, 0.496456f},
160 {0.632805f, 0.187893f, 0.495332f},
161 {0.639216f, 0.189921f, 0.494150f},
162 {0.645633f, 0.191952f, 0.492910f},
163 {0.652056f, 0.193986f, 0.491611f},
164 {0.658483f, 0.196027f, 0.490253f},
165 {0.664915f, 0.198075f, 0.488836f},
166 {0.671349f, 0.200133f, 0.487358f},
167 {0.677786f, 0.202203f, 0.485819f},
168 {0.684224f, 0.204286f, 0.484219f},
169 {0.690661f, 0.206384f, 0.482558f},
170 {0.697098f, 0.208501f, 0.480835f},
171 {0.703532f, 0.210638f, 0.479049f},
172 {0.709962f, 0.212797f, 0.477201f},
173 {0.716387f, 0.214982f, 0.475290f},
174 {0.722805f, 0.217194f, 0.473316f},
175 {0.729216f, 0.219437f, 0.471279f},
176 {0.735616f, 0.221713f, 0.469180f},
177 {0.742004f, 0.224025f, 0.467018f},
178 {0.748378f, 0.226377f, 0.464794f},
179 {0.754737f, 0.228772f, 0.462509f},
180 {0.761077f, 0.231214f, 0.460162f},
181 {0.767398f, 0.233705f, 0.457755f},
182 {0.773695f, 0.236249f, 0.455289f},
183 {0.779968f, 0.238851f, 0.452765f},
184 {0.786212f, 0.241514f, 0.450184f},
185 {0.792427f, 0.244242f, 0.447543f},
186 {0.798608f, 0.247040f, 0.444848f},
187 {0.804752f, 0.249911f, 0.442102f},
188 {0.810855f, 0.252861f, 0.439305f},
189 {0.816914f, 0.255895f, 0.436461f},
190 {0.822926f, 0.259016f, 0.433573f},
191 {0.828886f, 0.262229f, 0.430644f},
192 {0.834791f, 0.265540f, 0.427671f},
193 {0.840636f, 0.268953f, 0.424666f},
194 {0.846416f, 0.272473f, 0.421631f},
195 {0.852126f, 0.276106f, 0.418573f},
196 {0.857763f, 0.279857f, 0.415496f},
197 {0.863320f, 0.283729f, 0.412403f},
198 {0.868793f, 0.287728f, 0.409303f},
199 {0.874176f, 0.291859f, 0.406205f},
200 {0.879464f, 0.296125f, 0.403118f},
201 {0.884651f, 0.300530f, 0.400047f},
202 {0.889731f, 0.305079f, 0.397002f},
203 {0.894700f, 0.309773f, 0.393995f},
204 {0.899552f, 0.314616f, 0.391037f},
205 {0.904281f, 0.319610f, 0.388137f},
206 {0.908884f, 0.324755f, 0.385308f},
207 {0.913354f, 0.330052f, 0.382563f},
208 {0.917689f, 0.335500f, 0.379915f},
209 {0.921884f, 0.341098f, 0.377376f},
210 {0.925937f, 0.346844f, 0.374959f},
211 {0.929845f, 0.352734f, 0.372677f},
212 {0.933606f, 0.358764f, 0.370541f},
213 {0.937221f, 0.364929f, 0.368567f},
214 {0.940687f, 0.371224f, 0.366762f},
215 {0.944006f, 0.377643f, 0.365136f},
216 {0.947180f, 0.384178f, 0.363701f},
217 {0.950210f, 0.390820f, 0.362468f},
218 {0.953099f, 0.397563f, 0.361438f},
219 {0.955849f, 0.404400f, 0.360619f},
220 {0.958464f, 0.411324f, 0.360014f},
221 {0.960949f, 0.418323f, 0.359630f},
222 {0.963310f, 0.425390f, 0.359469f},
223 {0.965549f, 0.432519f, 0.359529f},
224 {0.967671f, 0.439703f, 0.359810f},
225 {0.969680f, 0.446936f, 0.360311f},
226 {0.971582f, 0.454210f, 0.361030f},
227 {0.973381f, 0.461520f, 0.361965f},
228 {0.975082f, 0.468861f, 0.363111f},
229 {0.976690f, 0.476226f, 0.364466f},
230 {0.978210f, 0.483612f, 0.366025f},
231 {0.979645f, 0.491014f, 0.367783f},
232 {0.981000f, 0.498428f, 0.369734f},
233 {0.982279f, 0.505851f, 0.371874f},
234 {0.983485f, 0.513280f, 0.374198f},
235 {0.984622f, 0.520713f, 0.376698f},
236 {0.985693f, 0.528148f, 0.379371f},
237 {0.986700f, 0.535582f, 0.382210f},
238 {0.987646f, 0.543015f, 0.385210f},
239 {0.988533f, 0.550446f, 0.388365f},
240 {0.989363f, 0.557873f, 0.391671f},
241 {0.990138f, 0.565296f, 0.395122f},
242 {0.990871f, 0.572706f, 0.398714f},
243 {0.991558f, 0.580107f, 0.402441f},
244 {0.992196f, 0.587502f, 0.406299f},
245 {0.992785f, 0.594891f, 0.410283f},
246 {0.993326f, 0.602275f, 0.414390f},
247 {0.993834f, 0.609644f, 0.418613f},
248 {0.994309f, 0.616999f, 0.422950f},
249 {0.994738f, 0.624350f, 0.427397f},
250 {0.995122f, 0.631696f, 0.431951f},
251 {0.995480f, 0.639027f, 0.436607f},
252 {0.995810f, 0.646344f, 0.441361f},
253 {0.996096f, 0.653659f, 0.446213f},
254 {0.996341f, 0.660969f, 0.451160f},
255 {0.996580f, 0.668256f, 0.456192f},
256 {0.996775f, 0.675541f, 0.461314f},
257 {0.996925f, 0.682828f, 0.466526f},
258 {0.997077f, 0.690088f, 0.471811f},
259 {0.997186f, 0.697349f, 0.477182f},
260 {0.997254f, 0.704611f, 0.482635f},
261 {0.997325f, 0.711848f, 0.488154f},
262 {0.997351f, 0.719089f, 0.493755f},
263 {0.997351f, 0.726324f, 0.499428f},
264 {0.997341f, 0.733545f, 0.505167f},
265 {0.997285f, 0.740772f, 0.510983f},
266 {0.997228f, 0.747981f, 0.516859f},
267 {0.997138f, 0.755190f, 0.522806f},
268 {0.997019f, 0.762398f, 0.528821f},
269 {0.996898f, 0.769591f, 0.534892f},
270 {0.996727f, 0.776795f, 0.541039f},
271 {0.996571f, 0.783977f, 0.547233f},
272 {0.996369f, 0.791167f, 0.553499f},
273 {0.996162f, 0.798348f, 0.559820f},
274 {0.995932f, 0.805527f, 0.566202f},
275 {0.995680f, 0.812706f, 0.572645f},
276 {0.995424f, 0.819875f, 0.579140f},
277 {0.995131f, 0.827052f, 0.585701f},
278 {0.994851f, 0.834213f, 0.592307f},
279 {0.994524f, 0.841387f, 0.598983f},
280 {0.994222f, 0.848540f, 0.605696f},
281 {0.993866f, 0.855711f, 0.612482f},
282 {0.993545f, 0.862859f, 0.619299f},
283 {0.993170f, 0.870024f, 0.626189f},
284 {0.992831f, 0.877168f, 0.633109f},
285 {0.992440f, 0.884330f, 0.640099f},
286 {0.992089f, 0.891470f, 0.647116f},
287 {0.991688f, 0.898627f, 0.654202f},
288 {0.991332f, 0.905763f, 0.661309f},
289 {0.990930f, 0.912915f, 0.668481f},
290 {0.990570f, 0.920049f, 0.675675f},
291 {0.990175f, 0.927196f, 0.682926f},
292 {0.989815f, 0.934329f, 0.690198f},
293 {0.989434f, 0.941470f, 0.697519f},
294 {0.989077f, 0.948604f, 0.704863f},
295 {0.988717f, 0.955742f, 0.712242f},
296 {0.988367f, 0.962878f, 0.719649f},
297 {0.988033f, 0.970012f, 0.727077f},
298 {0.987691f, 0.977154f, 0.734536f},
299 {0.987387f, 0.984288f, 0.742002f},
300 { 0.987053f, 0.991438f, 0.749504f } };
303 { {0.267004, 0.004874, 0.329415},
304 {0.268510, 0.009605, 0.335427},
305 {0.269944, 0.014625, 0.341379},
306 {0.271305, 0.019942, 0.347269},
307 {0.272594, 0.025563, 0.353093},
308 {0.273809, 0.031497, 0.358853},
309 {0.274952, 0.037752, 0.364543},
310 {0.276022, 0.044167, 0.370164},
311 {0.277018, 0.050344, 0.375715},
312 {0.277941, 0.056324, 0.381191},
313 {0.278791, 0.062145, 0.386592},
314 {0.279566, 0.067836, 0.391917},
315 {0.280267, 0.073417, 0.397163},
316 {0.280894, 0.078907, 0.402329},
317 {0.281446, 0.084320, 0.407414},
318 {0.281924, 0.089666, 0.412415},
319 {0.282327, 0.094955, 0.417331},
320 {0.282656, 0.100196, 0.422160},
321 {0.282910, 0.105393, 0.426902},
322 {0.283091, 0.110553, 0.431554},
323 {0.283197, 0.115680, 0.436115},
324 {0.283229, 0.120777, 0.440584},
325 {0.283187, 0.125848, 0.444960},
326 {0.283072, 0.130895, 0.449241},
327 {0.282884, 0.135920, 0.453427},
328 {0.282623, 0.140926, 0.457517},
329 {0.282290, 0.145912, 0.461510},
330 {0.281887, 0.150881, 0.465405},
331 {0.281412, 0.155834, 0.469201},
332 {0.280868, 0.160771, 0.472899},
333 {0.280255, 0.165693, 0.476498},
334 {0.279574, 0.170599, 0.479997},
335 {0.278826, 0.175490, 0.483397},
336 {0.278012, 0.180367, 0.486697},
337 {0.277134, 0.185228, 0.489898},
338 {0.276194, 0.190074, 0.493001},
339 {0.275191, 0.194905, 0.496005},
340 {0.274128, 0.199721, 0.498911},
341 {0.273006, 0.204520, 0.501721},
342 {0.271828, 0.209303, 0.504434},
343 {0.270595, 0.214069, 0.507052},
344 {0.269308, 0.218818, 0.509577},
345 {0.267968, 0.223549, 0.512008},
346 {0.266580, 0.228262, 0.514349},
347 {0.265145, 0.232956, 0.516599},
348 {0.263663, 0.237631, 0.518762},
349 {0.262138, 0.242286, 0.520837},
350 {0.260571, 0.246922, 0.522828},
351 {0.258965, 0.251537, 0.524736},
352 {0.257322, 0.256130, 0.526563},
353 {0.255645, 0.260703, 0.528312},
354 {0.253935, 0.265254, 0.529983},
355 {0.252194, 0.269783, 0.531579},
356 {0.250425, 0.274290, 0.533103},
357 {0.248629, 0.278775, 0.534556},
358 {0.246811, 0.283237, 0.535941},
359 {0.244972, 0.287675, 0.537260},
360 {0.243113, 0.292092, 0.538516},
361 {0.241237, 0.296485, 0.539709},
362 {0.239346, 0.300855, 0.540844},
363 {0.237441, 0.305202, 0.541921},
364 {0.235526, 0.309527, 0.542944},
365 {0.233603, 0.313828, 0.543914},
366 {0.231674, 0.318106, 0.544834},
367 {0.229739, 0.322361, 0.545706},
368 {0.227802, 0.326594, 0.546532},
369 {0.225863, 0.330805, 0.547314},
370 {0.223925, 0.334994, 0.548053},
371 {0.221989, 0.339161, 0.548752},
372 {0.220057, 0.343307, 0.549413},
373 {0.218130, 0.347432, 0.550038},
374 {0.216210, 0.351535, 0.550627},
375 {0.214298, 0.355619, 0.551184},
376 {0.212395, 0.359683, 0.551710},
377 {0.210503, 0.363727, 0.552206},
378 {0.208623, 0.367752, 0.552675},
379 {0.206756, 0.371758, 0.553117},
380 {0.204903, 0.375746, 0.553533},
381 {0.203063, 0.379716, 0.553925},
382 {0.201239, 0.383670, 0.554294},
383 {0.199430, 0.387607, 0.554642},
384 {0.197636, 0.391528, 0.554969},
385 {0.195860, 0.395433, 0.555276},
386 {0.194100, 0.399323, 0.555565},
387 {0.192357, 0.403199, 0.555836},
388 {0.190631, 0.407061, 0.556089},
389 {0.188923, 0.410910, 0.556326},
390 {0.187231, 0.414746, 0.556547},
391 {0.185556, 0.418570, 0.556753},
392 {0.183898, 0.422383, 0.556944},
393 {0.182256, 0.426184, 0.557120},
394 {0.180629, 0.429975, 0.557282},
395 {0.179019, 0.433756, 0.557430},
396 {0.177423, 0.437527, 0.557565},
397 {0.175841, 0.441290, 0.557685},
398 {0.174274, 0.445044, 0.557792},
399 {0.172719, 0.448791, 0.557885},
400 {0.171176, 0.452530, 0.557965},
401 {0.169646, 0.456262, 0.558030},
402 {0.168126, 0.459988, 0.558082},
403 {0.166617, 0.463708, 0.558119},
404 {0.165117, 0.467423, 0.558141},
405 {0.163625, 0.471133, 0.558148},
406 {0.162142, 0.474838, 0.558140},
407 {0.160665, 0.478540, 0.558115},
408 {0.159194, 0.482237, 0.558073},
409 {0.157729, 0.485932, 0.558013},
410 {0.156270, 0.489624, 0.557936},
411 {0.154815, 0.493313, 0.557840},
412 {0.153364, 0.497000, 0.557724},
413 {0.151918, 0.500685, 0.557587},
414 {0.150476, 0.504369, 0.557430},
415 {0.149039, 0.508051, 0.557250},
416 {0.147607, 0.511733, 0.557049},
417 {0.146180, 0.515413, 0.556823},
418 {0.144759, 0.519093, 0.556572},
419 {0.143343, 0.522773, 0.556295},
420 {0.141935, 0.526453, 0.555991},
421 {0.140536, 0.530132, 0.555659},
422 {0.139147, 0.533812, 0.555298},
423 {0.137770, 0.537492, 0.554906},
424 {0.136408, 0.541173, 0.554483},
425 {0.135066, 0.544853, 0.554029},
426 {0.133743, 0.548535, 0.553541},
427 {0.132444, 0.552216, 0.553018},
428 {0.131172, 0.555899, 0.552459},
429 {0.129933, 0.559582, 0.551864},
430 {0.128729, 0.563265, 0.551229},
431 {0.127568, 0.566949, 0.550556},
432 {0.126453, 0.570633, 0.549841},
433 {0.125394, 0.574318, 0.549086},
434 {0.124395, 0.578002, 0.548287},
435 {0.123463, 0.581687, 0.547445},
436 {0.122606, 0.585371, 0.546557},
437 {0.121831, 0.589055, 0.545623},
438 {0.121148, 0.592739, 0.544641},
439 {0.120565, 0.596422, 0.543611},
440 {0.120092, 0.600104, 0.542530},
441 {0.119738, 0.603785, 0.541400},
442 {0.119512, 0.607464, 0.540218},
443 {0.119423, 0.611141, 0.538982},
444 {0.119483, 0.614817, 0.537692},
445 {0.119699, 0.618490, 0.536347},
446 {0.120081, 0.622161, 0.534946},
447 {0.120638, 0.625828, 0.533488},
448 {0.121380, 0.629492, 0.531973},
449 {0.122312, 0.633153, 0.530398},
450 {0.123444, 0.636809, 0.528763},
451 {0.124780, 0.640461, 0.527068},
452 {0.126326, 0.644107, 0.525311},
453 {0.128087, 0.647749, 0.523491},
454 {0.130067, 0.651384, 0.521608},
455 {0.132268, 0.655014, 0.519661},
456 {0.134692, 0.658636, 0.517649},
457 {0.137339, 0.662252, 0.515571},
458 {0.140210, 0.665859, 0.513427},
459 {0.143303, 0.669459, 0.511215},
460 {0.146616, 0.673050, 0.508936},
461 {0.150148, 0.676631, 0.506589},
462 {0.153894, 0.680203, 0.504172},
463 {0.157851, 0.683765, 0.501686},
464 {0.162016, 0.687316, 0.499129},
465 {0.166383, 0.690856, 0.496502},
466 {0.170948, 0.694384, 0.493803},
467 {0.175707, 0.697900, 0.491033},
468 {0.180653, 0.701402, 0.488189},
469 {0.185783, 0.704891, 0.485273},
470 {0.191090, 0.708366, 0.482284},
471 {0.196571, 0.711827, 0.479221},
472 {0.202219, 0.715272, 0.476084},
473 {0.208030, 0.718701, 0.472873},
474 {0.214000, 0.722114, 0.469588},
475 {0.220124, 0.725509, 0.466226},
476 {0.226397, 0.728888, 0.462789},
477 {0.232815, 0.732247, 0.459277},
478 {0.239374, 0.735588, 0.455688},
479 {0.246070, 0.738910, 0.452024},
480 {0.252899, 0.742211, 0.448284},
481 {0.259857, 0.745492, 0.444467},
482 {0.266941, 0.748751, 0.440573},
483 {0.274149, 0.751988, 0.436601},
484 {0.281477, 0.755203, 0.432552},
485 {0.288921, 0.758394, 0.428426},
486 {0.296479, 0.761561, 0.424223},
487 {0.304148, 0.764704, 0.419943},
488 {0.311925, 0.767822, 0.415586},
489 {0.319809, 0.770914, 0.411152},
490 {0.327796, 0.773980, 0.406640},
491 {0.335885, 0.777018, 0.402049},
492 {0.344074, 0.780029, 0.397381},
493 {0.352360, 0.783011, 0.392636},
494 {0.360741, 0.785964, 0.387814},
495 {0.369214, 0.788888, 0.382914},
496 {0.377779, 0.791781, 0.377939},
497 {0.386433, 0.794644, 0.372886},
498 {0.395174, 0.797475, 0.367757},
499 {0.404001, 0.800275, 0.362552},
500 {0.412913, 0.803041, 0.357269},
501 {0.421908, 0.805774, 0.351910},
502 {0.430983, 0.808473, 0.346476},
503 {0.440137, 0.811138, 0.340967},
504 {0.449368, 0.813768, 0.335384},
505 {0.458674, 0.816363, 0.329727},
506 {0.468053, 0.818921, 0.323998},
507 {0.477504, 0.821444, 0.318195},
508 {0.487026, 0.823929, 0.312321},
509 {0.496615, 0.826376, 0.306377},
510 {0.506271, 0.828786, 0.300362},
511 {0.515992, 0.831158, 0.294279},
512 {0.525776, 0.833491, 0.288127},
513 {0.535621, 0.835785, 0.281908},
514 {0.545524, 0.838039, 0.275626},
515 {0.555484, 0.840254, 0.269281},
516 {0.565498, 0.842430, 0.262877},
517 {0.575563, 0.844566, 0.256415},
518 {0.585678, 0.846661, 0.249897},
519 {0.595839, 0.848717, 0.243329},
520 {0.606045, 0.850733, 0.236712},
521 {0.616293, 0.852709, 0.230052},
522 {0.626579, 0.854645, 0.223353},
523 {0.636902, 0.856542, 0.216620},
524 {0.647257, 0.858400, 0.209861},
525 {0.657642, 0.860219, 0.203082},
526 {0.668054, 0.861999, 0.196293},
527 {0.678489, 0.863742, 0.189503},
528 {0.688944, 0.865448, 0.182725},
529 {0.699415, 0.867117, 0.175971},
530 {0.709898, 0.868751, 0.169257},
531 {0.720391, 0.870350, 0.162603},
532 {0.730889, 0.871916, 0.156029},
533 {0.741388, 0.873449, 0.149561},
534 {0.751884, 0.874951, 0.143228},
535 {0.762373, 0.876424, 0.137064},
536 {0.772852, 0.877868, 0.131109},
537 {0.783315, 0.879285, 0.125405},
538 {0.793760, 0.880678, 0.120005},
539 {0.804182, 0.882046, 0.114965},
540 {0.814576, 0.883393, 0.110347},
541 {0.824940, 0.884720, 0.106217},
542 {0.835270, 0.886029, 0.102646},
543 {0.845561, 0.887322, 0.099702},
544 {0.855810, 0.888601, 0.097452},
545 {0.866013, 0.889868, 0.095953},
546 {0.876168, 0.891125, 0.095250},
547 {0.886271, 0.892374, 0.095374},
548 {0.896320, 0.893616, 0.096335},
549 {0.906311, 0.894855, 0.098125},
550 {0.916242, 0.896091, 0.100717},
551 {0.926106, 0.897330, 0.104071},
552 {0.935904, 0.898570, 0.108131},
553 {0.945636, 0.899815, 0.112838},
554 {0.955300, 0.901065, 0.118128},
555 {0.964894, 0.902323, 0.123941},
556 {0.974417, 0.903590, 0.130215},
557 {0.983868, 0.904867, 0.136897},
558 {0.993248, 0.906157, 0.143936}
569 auto r = int32_t(
magma[
uint8_t(percent * 255)][0] * 255);
570 auto g = int32_t(
magma[
uint8_t(percent * 255)][1] * 255);
571 auto b = int32_t(
magma[
uint8_t(percent * 255)][2] * 255);
577 for(
uint32_t i = 0; i <= 16; i += 8) {
578 auto diff = int32_t(top_color >> i & 0xFF) - int32_t(bot_color >> i & 0xFF);
579 color |=
uint32_t(int32_t(bot_color >> i & 0xFF) + diff * percent) << i;
590 return dcon::fatten(state.world,
id).get_ideology().get_color();
pop_satisfaction_wrapper_fat fatten(data_container const &c, pop_satisfaction_wrapper_id id) noexcept
constexpr double viridis[256][3]
uint32_t color_gradient_magma(float percent)
uint32_t get_ui_color(sys::state &state, T id)
constexpr uint32_t color_from_hash(uint32_t color)
constexpr float magma[256][3]
uint32_t color_gradient_viridis(float percent)
uint32_t color_gradient(float percent, uint32_t top_color, uint32_t bot_color)
uint32_t pack_color(float r, float g, float b)
Holds important data about the game world, state, and other data regarding windowing,...