ratio_color/
presets.rs

1//! # Presets module
2//!
3//! Preset colors for both categorical and numerical palettes.
4//!
5//! ## License
6//!
7//! This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
8//! If a copy of the MPL was not distributed with this file,
9//! You can obtain one at <https://mozilla.org/MPL/2.0/>.
10
11use std::marker::PhantomData;
12
13use palette::Srgba;
14
15use crate::color::HexRgba;
16use crate::{LinearGradient, Preset};
17
18/// Ratio's favorite color for binary values.
19pub const BINARY: HexRgba = HexRgba {
20    value: Srgba {
21        color: palette::rgb::Rgb {
22            red: 100,
23            green: 110,
24            blue: 250,
25            standard: PhantomData,
26        },
27        alpha: 255,
28    },
29};
30
31/// Categorical presets.
32#[derive(Copy, Clone, Debug, Default, PartialEq)]
33#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
34#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
35#[cfg_attr(feature = "reactive", derive(reactive_stores::Store))]
36#[cfg_attr(
37    feature = "strum",
38    derive(
39        strum::AsRefStr,
40        strum::Display,
41        strum::EnumIter,
42        strum::EnumString,
43        strum::FromRepr,
44        strum::IntoStaticStr,
45        strum::VariantNames,
46    )
47)]
48pub enum Categorical {
49    #[default]
50    Plotly,
51    D3,
52    G10,
53    T10,
54    Alphabet,
55    Dark24,
56    Light24,
57    Set1,
58    Pastel1,
59    Dark2,
60    Set2,
61    Pastel2,
62    Set3,
63    Antique,
64    Bold,
65    Pastel,
66    Prism,
67    Safe,
68    Vivid,
69}
70impl Preset for Categorical {
71    type Value = Srgba<u8>;
72
73    fn values(&self) -> Vec<Self::Value> {
74        let rgbas: &[(u8, u8, u8, u8)] = match self {
75            Self::Plotly => &CAT_PLOTLY,
76            Self::D3 => &CAT_D3,
77            Self::G10 => &CAT_G10,
78            Self::T10 => &CAT_T10,
79            Self::Alphabet => &CAT_ALPHABET,
80            Self::Dark24 => &CAT_DARK24,
81            Self::Light24 => &CAT_LIGHT24,
82            Self::Set1 => &CAT_SET1,
83            Self::Pastel1 => &CAT_PASTEL1,
84            Self::Dark2 => &CAT_DARK2,
85            Self::Set2 => &CAT_SET2,
86            Self::Pastel2 => &CAT_PASTEL2,
87            Self::Set3 => &CAT_SET3,
88            Self::Antique => &CAT_ANTIQUE,
89            Self::Bold => &CAT_BOLD,
90            Self::Pastel => &CAT_PASTEL,
91            Self::Prism => &CAT_PRISM,
92            Self::Safe => &CAT_SAFE,
93            Self::Vivid => &CAT_VIVID,
94        };
95        rgbas
96            .iter()
97            .map(|&(r, g, b, a)| Srgba::new(r, g, b, a))
98            .collect()
99    }
100}
101
102/// Numerical presets.
103#[derive(Copy, Clone, Debug, Default, PartialEq)]
104#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
105#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
106#[cfg_attr(feature = "reactive", derive(reactive_stores::Store))]
107#[cfg_attr(
108    feature = "strum",
109    derive(
110        strum::AsRefStr,
111        strum::Display,
112        strum::EnumIter,
113        strum::EnumString,
114        strum::FromRepr,
115        strum::IntoStaticStr,
116        strum::VariantNames,
117    )
118)]
119pub enum Numerical {
120    #[default]
121    Ratio,
122    CycTwilight,
123    CycIceFire,
124    CycEdge,
125    CycPhase,
126    CycHSV,
127    CycMrybm,
128    CycMygbm,
129    DivBrBG,
130    DivPRGn,
131    DivPiYG,
132    DivPuOr,
133    DivRdBu,
134    DivRdGy,
135    DivRdYlBu,
136    DivRdYlGn,
137    DivSpectral,
138    DivBalance,
139    DivDelta,
140    DivCurl,
141    DivOxy,
142    DivArmyrose,
143    DivFall,
144    DivGeyser,
145    DivTemps,
146    DivTealrose,
147    DivTropic,
148    DivEarth,
149    DivPicnic,
150    DivPortland,
151    SeqPlotly3,
152    SeqViridis,
153    SeqCividis,
154    SeqInferno,
155    SeqMagma,
156    SeqPlasma,
157    SeqTurbo,
158    SeqBlackbody,
159    SeqBluered,
160    SeqElectric,
161    SeqHot,
162    SeqJet,
163    SeqRainbow,
164    SeqBlues,
165    SeqBuGn,
166    SeqBuPu,
167    SeqGnBu,
168    SeqGreens,
169    SeqGreys,
170    SeqOrRd,
171    SeqOranges,
172    SeqPuBu,
173    SeqPuBuGn,
174    SeqPuRd,
175    SeqPurples,
176    SeqRdBu,
177    SeqRdPu,
178    SeqReds,
179    SeqYlGn,
180    SeqYlGnBu,
181    SeqYlOrBr,
182    SeqYlOrRd,
183    SeqTurbid,
184    SeqThermal,
185    SeqHaline,
186    SeqSolar,
187    SeqIce,
188    SeqGray,
189    SeqDeep,
190    SeqDense,
191    SeqAlgae,
192    SeqMatter,
193    SeqSpeed,
194    SeqAmp,
195    SeqTempo,
196    SeqBurg,
197    SeqBurgyl,
198    SeqRedor,
199    SeqOryel,
200    SeqPeach,
201    SeqPinkyl,
202    SeqMint,
203    SeqBlugrn,
204    SeqDarkmint,
205    SeqEmrld,
206    SeqAggrnyl,
207    SeqBluyl,
208    SeqTeal,
209    SeqTealgrn,
210    SeqPurp,
211    SeqPurpor,
212    SeqSunset,
213    SeqMagenta,
214    SeqSunsetdark,
215    SeqAgsunset,
216    SeqBrwnyl,
217}
218impl Numerical {
219    /// The colors of the color scale in sequential order.
220    pub fn colors(&self) -> Vec<Srgba<u8>> {
221        let rgbas: &[(u8, u8, u8, u8)] = match self {
222            Self::Ratio => &NUM_RATIO,
223            Self::CycTwilight => &CYC_TWILIGHT,
224            Self::CycIceFire => &CYC_ICEFIRE,
225            Self::CycEdge => &CYC_EDGE,
226            Self::CycPhase => &CYC_PHASE,
227            Self::CycHSV => &CYC_HSV,
228            Self::CycMrybm => &CYC_MRYBM,
229            Self::CycMygbm => &CYC_MYGBM,
230            Self::DivBrBG => &DIV_BRBG,
231            Self::DivPRGn => &DIV_PRGN,
232            Self::DivPiYG => &DIV_PIYG,
233            Self::DivPuOr => &DIV_PUOR,
234            Self::DivRdBu => &DIV_RDBU,
235            Self::DivRdGy => &DIV_RDGY,
236            Self::DivRdYlBu => &DIV_RDYLBU,
237            Self::DivRdYlGn => &DIV_RDYLGN,
238            Self::DivSpectral => &DIV_SPECTRAL,
239            Self::DivBalance => &DIV_BALANCE,
240            Self::DivDelta => &DIV_DELTA,
241            Self::DivCurl => &DIV_CURL,
242            Self::DivOxy => &DIV_OXY,
243            Self::DivArmyrose => &DIV_ARMYROSE,
244            Self::DivFall => &DIV_FALL,
245            Self::DivGeyser => &DIV_GEYSER,
246            Self::DivTemps => &DIV_TEMPS,
247            Self::DivTealrose => &DIV_TEALROSE,
248            Self::DivTropic => &DIV_TROPIC,
249            Self::DivEarth => &DIV_EARTH,
250            Self::DivPicnic => &DIV_PICNIC,
251            Self::DivPortland => &DIV_PORTLAND,
252            Self::SeqPlotly3 => &SEQ_PLOTLY3,
253            Self::SeqViridis => &SEQ_VIRIDIS,
254            Self::SeqCividis => &SEQ_CIVIDIS,
255            Self::SeqInferno => &SEQ_INFERNO,
256            Self::SeqMagma => &SEQ_MAGMA,
257            Self::SeqPlasma => &SEQ_PLASMA,
258            Self::SeqTurbo => &SEQ_TURBO,
259            Self::SeqBlackbody => &SEQ_BLACKBODY,
260            Self::SeqBluered => &SEQ_BLUERED,
261            Self::SeqElectric => &SEQ_ELECTRIC,
262            Self::SeqHot => &SEQ_HOT,
263            Self::SeqJet => &SEQ_JET,
264            Self::SeqRainbow => &SEQ_RAINBOW,
265            Self::SeqBlues => &SEQ_BLUES,
266            Self::SeqBuGn => &SEQ_BUGN,
267            Self::SeqBuPu => &SEQ_BUPU,
268            Self::SeqGnBu => &SEQ_GNBU,
269            Self::SeqGreens => &SEQ_GREENS,
270            Self::SeqGreys => &SEQ_GREYS,
271            Self::SeqOrRd => &SEQ_ORRD,
272            Self::SeqOranges => &SEQ_ORANGES,
273            Self::SeqPuBu => &SEQ_PUBU,
274            Self::SeqPuBuGn => &SEQ_PUBUGN,
275            Self::SeqPuRd => &SEQ_PURD,
276            Self::SeqPurples => &SEQ_PURPLES,
277            Self::SeqRdBu => &SEQ_RDBU,
278            Self::SeqRdPu => &SEQ_RDPU,
279            Self::SeqReds => &SEQ_REDS,
280            Self::SeqYlGn => &SEQ_YLGN,
281            Self::SeqYlGnBu => &SEQ_YLGNBU,
282            Self::SeqYlOrBr => &SEQ_YLORBR,
283            Self::SeqYlOrRd => &SEQ_YLORRD,
284            Self::SeqTurbid => &SEQ_TURBID,
285            Self::SeqThermal => &SEQ_THERMAL,
286            Self::SeqHaline => &SEQ_HALINE,
287            Self::SeqSolar => &SEQ_SOLAR,
288            Self::SeqIce => &SEQ_ICE,
289            Self::SeqGray => &SEQ_GRAY,
290            Self::SeqDeep => &SEQ_DEEP,
291            Self::SeqDense => &SEQ_DENSE,
292            Self::SeqAlgae => &SEQ_ALGAE,
293            Self::SeqMatter => &SEQ_MATTER,
294            Self::SeqSpeed => &SEQ_SPEED,
295            Self::SeqAmp => &SEQ_AMP,
296            Self::SeqTempo => &SEQ_TEMPO,
297            Self::SeqBurg => &SEQ_BURG,
298            Self::SeqBurgyl => &SEQ_BURGYL,
299            Self::SeqRedor => &SEQ_REDOR,
300            Self::SeqOryel => &SEQ_ORYEL,
301            Self::SeqPeach => &SEQ_PEACH,
302            Self::SeqPinkyl => &SEQ_PINKYL,
303            Self::SeqMint => &SEQ_MINT,
304            Self::SeqBlugrn => &SEQ_BLUGRN,
305            Self::SeqDarkmint => &SEQ_DARKMINT,
306            Self::SeqEmrld => &SEQ_EMRLD,
307            Self::SeqAggrnyl => &SEQ_AGGRNYL,
308            Self::SeqBluyl => &SEQ_BLUYL,
309            Self::SeqTeal => &SEQ_TEAL,
310            Self::SeqTealgrn => &SEQ_TEALGRN,
311            Self::SeqPurp => &SEQ_PURP,
312            Self::SeqPurpor => &SEQ_PURPOR,
313            Self::SeqSunset => &SEQ_SUNSET,
314            Self::SeqMagenta => &SEQ_MAGENTA,
315            Self::SeqSunsetdark => &SEQ_SUNSETDARK,
316            Self::SeqAgsunset => &SEQ_AGSUNSET,
317            Self::SeqBrwnyl => &SEQ_BRWNYL,
318        };
319        rgbas
320            .iter()
321            .map(|&(r, g, b, a)| Srgba::new(r, g, b, a))
322            .collect()
323    }
324}
325impl From<&Numerical> for LinearGradient {
326    fn from(value: &Numerical) -> Self {
327        let colors = value.colors();
328        LinearGradient::try_new(colors, None).expect("a valid preset")
329    }
330}
331impl From<Numerical> for LinearGradient {
332    fn from(value: Numerical) -> Self {
333        let colors = value.colors();
334        LinearGradient::try_new(colors, None).expect("a valid preset")
335    }
336}
337impl Preset for Numerical {
338    type Value = Vec<Srgba<u8>>;
339    fn values(&self) -> Vec<Self::Value> {
340        vec![self.colors()]
341    }
342}
343
344/// Ratio numerical palette as RGBa tuples.
345pub const NUM_RATIO: [(u8, u8, u8, u8); 9] = [
346    (182, 234, 217, 255),
347    (149, 217, 213, 255),
348    (125, 194, 213, 255),
349    (112, 165, 213, 255),
350    (107, 134, 205, 255),
351    (108, 102, 188, 255),
352    (107, 73, 159, 255),
353    (100, 48, 121, 255),
354    (84, 29, 79, 255),
355];
356
357pub const CAT_PLOTLY: [(u8, u8, u8, u8); 10] = [
358    (99, 110, 250, 255),
359    (239, 85, 59, 255),
360    (0, 204, 150, 255),
361    (171, 99, 250, 255),
362    (255, 161, 90, 255),
363    (25, 211, 243, 255),
364    (255, 102, 146, 255),
365    (182, 232, 128, 255),
366    (255, 151, 255, 255),
367    (254, 203, 82, 255),
368];
369pub const CAT_D3: [(u8, u8, u8, u8); 10] = [
370    (31, 119, 180, 255),
371    (255, 127, 14, 255),
372    (44, 160, 44, 255),
373    (214, 39, 40, 255),
374    (148, 103, 189, 255),
375    (140, 86, 75, 255),
376    (227, 119, 194, 255),
377    (127, 127, 127, 255),
378    (188, 189, 34, 255),
379    (23, 190, 207, 255),
380];
381pub const CAT_G10: [(u8, u8, u8, u8); 10] = [
382    (51, 102, 204, 255),
383    (220, 57, 18, 255),
384    (255, 153, 0, 255),
385    (16, 150, 24, 255),
386    (153, 0, 153, 255),
387    (0, 153, 198, 255),
388    (221, 68, 119, 255),
389    (102, 170, 0, 255),
390    (184, 46, 46, 255),
391    (49, 99, 149, 255),
392];
393pub const CAT_T10: [(u8, u8, u8, u8); 10] = [
394    (76, 120, 168, 255),
395    (245, 133, 24, 255),
396    (228, 87, 86, 255),
397    (114, 183, 178, 255),
398    (84, 162, 75, 255),
399    (238, 202, 59, 255),
400    (178, 121, 162, 255),
401    (255, 157, 166, 255),
402    (157, 117, 93, 255),
403    (186, 176, 172, 255),
404];
405pub const CAT_ALPHABET: [(u8, u8, u8, u8); 26] = [
406    (170, 13, 254, 255),
407    (50, 131, 254, 255),
408    (133, 102, 13, 255),
409    (120, 42, 182, 255),
410    (86, 86, 86, 255),
411    (28, 131, 86, 255),
412    (22, 255, 50, 255),
413    (247, 225, 160, 255),
414    (226, 226, 226, 255),
415    (28, 190, 79, 255),
416    (196, 69, 28, 255),
417    (222, 160, 253, 255),
418    (254, 0, 250, 255),
419    (50, 90, 155, 255),
420    (254, 175, 22, 255),
421    (248, 161, 159, 255),
422    (144, 173, 28, 255),
423    (246, 34, 46, 255),
424    (28, 255, 206, 255),
425    (46, 217, 255, 255),
426    (177, 13, 161, 255),
427    (192, 117, 166, 255),
428    (252, 28, 191, 255),
429    (176, 0, 104, 255),
430    (251, 228, 38, 255),
431    (250, 0, 135, 255),
432];
433pub const CAT_DARK24: [(u8, u8, u8, u8); 24] = [
434    (46, 145, 229, 255),
435    (225, 95, 153, 255),
436    (28, 167, 28, 255),
437    (251, 13, 13, 255),
438    (218, 22, 255, 255),
439    (34, 42, 42, 255),
440    (182, 129, 0, 255),
441    (117, 13, 134, 255),
442    (235, 102, 59, 255),
443    (81, 28, 251, 255),
444    (0, 160, 139, 255),
445    (251, 0, 209, 255),
446    (252, 0, 128, 255),
447    (178, 130, 141, 255),
448    (108, 124, 50, 255),
449    (119, 138, 174, 255),
450    (134, 42, 22, 255),
451    (167, 119, 241, 255),
452    (98, 0, 66, 255),
453    (22, 22, 167, 255),
454    (218, 96, 202, 255),
455    (108, 69, 22, 255),
456    (13, 42, 99, 255),
457    (175, 0, 56, 255),
458];
459pub const CAT_LIGHT24: [(u8, u8, u8, u8); 24] = [
460    (253, 50, 22, 255),
461    (0, 254, 53, 255),
462    (106, 118, 252, 255),
463    (254, 212, 196, 255),
464    (254, 0, 206, 255),
465    (13, 249, 255, 255),
466    (246, 249, 38, 255),
467    (255, 150, 22, 255),
468    (71, 155, 85, 255),
469    (238, 166, 251, 255),
470    (220, 88, 125, 255),
471    (214, 38, 255, 255),
472    (110, 137, 156, 255),
473    (0, 181, 247, 255),
474    (182, 142, 0, 255),
475    (201, 251, 229, 255),
476    (255, 0, 146, 255),
477    (34, 255, 167, 255),
478    (227, 238, 158, 255),
479    (134, 206, 0, 255),
480    (188, 113, 150, 255),
481    (126, 125, 205, 255),
482    (252, 105, 85, 255),
483    (228, 143, 114, 255),
484];
485pub const CAT_SET1: [(u8, u8, u8, u8); 9] = [
486    (228, 26, 28, 255),
487    (55, 126, 184, 255),
488    (77, 175, 74, 255),
489    (152, 78, 163, 255),
490    (255, 127, 0, 255),
491    (255, 255, 51, 255),
492    (166, 86, 40, 255),
493    (247, 129, 191, 255),
494    (153, 153, 153, 255),
495];
496pub const CAT_PASTEL1: [(u8, u8, u8, u8); 9] = [
497    (251, 180, 174, 255),
498    (179, 205, 227, 255),
499    (204, 235, 197, 255),
500    (222, 203, 228, 255),
501    (254, 217, 166, 255),
502    (255, 255, 204, 255),
503    (229, 216, 189, 255),
504    (253, 218, 236, 255),
505    (242, 242, 242, 255),
506];
507pub const CAT_DARK2: [(u8, u8, u8, u8); 8] = [
508    (27, 158, 119, 255),
509    (217, 95, 2, 255),
510    (117, 112, 179, 255),
511    (231, 41, 138, 255),
512    (102, 166, 30, 255),
513    (230, 171, 2, 255),
514    (166, 118, 29, 255),
515    (102, 102, 102, 255),
516];
517pub const CAT_SET2: [(u8, u8, u8, u8); 8] = [
518    (102, 194, 165, 255),
519    (252, 141, 98, 255),
520    (141, 160, 203, 255),
521    (231, 138, 195, 255),
522    (166, 216, 84, 255),
523    (255, 217, 47, 255),
524    (229, 196, 148, 255),
525    (179, 179, 179, 255),
526];
527pub const CAT_PASTEL2: [(u8, u8, u8, u8); 8] = [
528    (179, 226, 205, 255),
529    (253, 205, 172, 255),
530    (203, 213, 232, 255),
531    (244, 202, 228, 255),
532    (230, 245, 201, 255),
533    (255, 242, 174, 255),
534    (241, 226, 204, 255),
535    (204, 204, 204, 255),
536];
537pub const CAT_SET3: [(u8, u8, u8, u8); 12] = [
538    (141, 211, 199, 255),
539    (255, 255, 179, 255),
540    (190, 186, 218, 255),
541    (251, 128, 114, 255),
542    (128, 177, 211, 255),
543    (253, 180, 98, 255),
544    (179, 222, 105, 255),
545    (252, 205, 229, 255),
546    (217, 217, 217, 255),
547    (188, 128, 189, 255),
548    (204, 235, 197, 255),
549    (255, 237, 111, 255),
550];
551pub const CAT_ANTIQUE: [(u8, u8, u8, u8); 11] = [
552    (133, 92, 117, 255),
553    (217, 175, 107, 255),
554    (175, 100, 88, 255),
555    (115, 111, 76, 255),
556    (82, 106, 131, 255),
557    (98, 83, 119, 255),
558    (104, 133, 92, 255),
559    (156, 156, 94, 255),
560    (160, 97, 119, 255),
561    (140, 120, 93, 255),
562    (124, 124, 124, 255),
563];
564pub const CAT_BOLD: [(u8, u8, u8, u8); 11] = [
565    (127, 60, 141, 255),
566    (17, 165, 121, 255),
567    (57, 105, 172, 255),
568    (242, 183, 1, 255),
569    (231, 63, 116, 255),
570    (128, 186, 90, 255),
571    (230, 131, 16, 255),
572    (0, 134, 149, 255),
573    (207, 28, 144, 255),
574    (249, 123, 114, 255),
575    (165, 170, 153, 255),
576];
577pub const CAT_PASTEL: [(u8, u8, u8, u8); 11] = [
578    (102, 197, 204, 255),
579    (246, 207, 113, 255),
580    (248, 156, 116, 255),
581    (220, 176, 242, 255),
582    (135, 197, 95, 255),
583    (158, 185, 243, 255),
584    (254, 136, 177, 255),
585    (201, 219, 116, 255),
586    (139, 224, 164, 255),
587    (180, 151, 231, 255),
588    (179, 179, 179, 255),
589];
590pub const CAT_PRISM: [(u8, u8, u8, u8); 11] = [
591    (95, 70, 144, 255),
592    (29, 105, 150, 255),
593    (56, 166, 165, 255),
594    (15, 133, 84, 255),
595    (115, 175, 72, 255),
596    (237, 173, 8, 255),
597    (225, 124, 5, 255),
598    (204, 80, 62, 255),
599    (148, 52, 110, 255),
600    (111, 64, 112, 255),
601    (102, 102, 102, 255),
602];
603pub const CAT_SAFE: [(u8, u8, u8, u8); 11] = [
604    (136, 204, 238, 255),
605    (204, 102, 119, 255),
606    (221, 204, 119, 255),
607    (17, 119, 51, 255),
608    (51, 34, 136, 255),
609    (170, 68, 153, 255),
610    (68, 170, 153, 255),
611    (153, 153, 51, 255),
612    (136, 34, 85, 255),
613    (102, 17, 0, 255),
614    (136, 136, 136, 255),
615];
616pub const CAT_VIVID: [(u8, u8, u8, u8); 11] = [
617    (229, 134, 6, 255),
618    (93, 105, 177, 255),
619    (82, 188, 163, 255),
620    (153, 201, 69, 255),
621    (204, 97, 176, 255),
622    (36, 121, 108, 255),
623    (218, 165, 27, 255),
624    (47, 138, 196, 255),
625    (118, 78, 159, 255),
626    (237, 100, 90, 255),
627    (165, 170, 153, 255),
628];
629pub const CYC_TWILIGHT: [(u8, u8, u8, u8); 10] = [
630    (226, 217, 226, 255),
631    (158, 187, 201, 255),
632    (103, 133, 190, 255),
633    (94, 67, 165, 255),
634    (66, 18, 87, 255),
635    (71, 19, 64, 255),
636    (142, 44, 80, 255),
637    (186, 102, 87, 255),
638    (206, 172, 148, 255),
639    (226, 217, 226, 255),
640];
641pub const CYC_ICEFIRE: [(u8, u8, u8, u8); 17] = [
642    (0, 0, 0, 255),
643    (0, 31, 77, 255),
644    (0, 55, 134, 255),
645    (14, 88, 168, 255),
646    (33, 126, 184, 255),
647    (48, 164, 202, 255),
648    (84, 200, 223, 255),
649    (155, 228, 239, 255),
650    (225, 233, 209, 255),
651    (243, 213, 115, 255),
652    (231, 176, 0, 255),
653    (218, 130, 0, 255),
654    (198, 84, 0, 255),
655    (172, 35, 1, 255),
656    (130, 0, 0, 255),
657    (76, 0, 0, 255),
658    (0, 0, 0, 255),
659];
660pub const CYC_EDGE: [(u8, u8, u8, u8); 17] = [
661    (49, 49, 49, 255),
662    (61, 1, 157, 255),
663    (56, 16, 220, 255),
664    (45, 71, 249, 255),
665    (37, 147, 255, 255),
666    (42, 222, 246, 255),
667    (96, 253, 250, 255),
668    (174, 253, 255, 255),
669    (243, 243, 241, 255),
670    (255, 253, 169, 255),
671    (250, 253, 91, 255),
672    (247, 218, 41, 255),
673    (255, 142, 37, 255),
674    (248, 67, 45, 255),
675    (217, 13, 57, 255),
676    (151, 2, 61, 255),
677    (49, 49, 49, 255),
678];
679pub const CYC_PHASE: [(u8, u8, u8, u8); 12] = [
680    (167, 119, 12, 255),
681    (197, 96, 51, 255),
682    (217, 67, 96, 255),
683    (221, 38, 163, 255),
684    (196, 59, 224, 255),
685    (153, 97, 244, 255),
686    (95, 127, 228, 255),
687    (40, 144, 183, 255),
688    (15, 151, 136, 255),
689    (39, 153, 79, 255),
690    (119, 141, 17, 255),
691    (167, 119, 12, 255),
692];
693pub const CYC_HSV: [(u8, u8, u8, u8); 10] = [
694    (255, 0, 0, 255),
695    (255, 167, 0, 255),
696    (175, 255, 0, 255),
697    (8, 255, 0, 255),
698    (0, 255, 159, 255),
699    (0, 183, 255, 255),
700    (0, 16, 255, 255),
701    (151, 0, 255, 255),
702    (255, 0, 191, 255),
703    (255, 0, 0, 255),
704];
705pub const CYC_MRYBM: [(u8, u8, u8, u8); 17] = [
706    (248, 132, 247, 255),
707    (249, 104, 196, 255),
708    (234, 67, 136, 255),
709    (207, 36, 75, 255),
710    (181, 26, 21, 255),
711    (189, 67, 4, 255),
712    (204, 105, 4, 255),
713    (213, 143, 4, 255),
714    (207, 170, 39, 255),
715    (161, 159, 98, 255),
716    (88, 138, 147, 255),
717    (34, 105, 196, 255),
718    (62, 62, 240, 255),
719    (107, 78, 249, 255),
720    (149, 107, 250, 255),
721    (205, 125, 254, 255),
722    (248, 132, 247, 255),
723];
724pub const CYC_MYGBM: [(u8, u8, u8, u8); 17] = [
725    (239, 85, 241, 255),
726    (251, 132, 206, 255),
727    (251, 175, 161, 255),
728    (252, 212, 113, 255),
729    (240, 237, 53, 255),
730    (198, 229, 22, 255),
731    (150, 211, 16, 255),
732    (97, 193, 11, 255),
733    (49, 172, 40, 255),
734    (67, 144, 100, 255),
735    (61, 113, 154, 255),
736    (40, 78, 200, 255),
737    (46, 33, 234, 255),
738    (99, 36, 245, 255),
739    (145, 57, 250, 255),
740    (197, 67, 250, 255),
741    (239, 85, 241, 255),
742];
743pub const DIV_BRBG: [(u8, u8, u8, u8); 11] = [
744    (84, 48, 5, 255),
745    (140, 81, 10, 255),
746    (191, 129, 45, 255),
747    (223, 194, 125, 255),
748    (246, 232, 195, 255),
749    (245, 245, 245, 255),
750    (199, 234, 229, 255),
751    (128, 205, 193, 255),
752    (53, 151, 143, 255),
753    (1, 102, 94, 255),
754    (0, 60, 48, 255),
755];
756pub const DIV_PRGN: [(u8, u8, u8, u8); 11] = [
757    (64, 0, 75, 255),
758    (118, 42, 131, 255),
759    (153, 112, 171, 255),
760    (194, 165, 207, 255),
761    (231, 212, 232, 255),
762    (247, 247, 247, 255),
763    (217, 240, 211, 255),
764    (166, 219, 160, 255),
765    (90, 174, 97, 255),
766    (27, 120, 55, 255),
767    (0, 68, 27, 255),
768];
769pub const DIV_PIYG: [(u8, u8, u8, u8); 11] = [
770    (142, 1, 82, 255),
771    (197, 27, 125, 255),
772    (222, 119, 174, 255),
773    (241, 182, 218, 255),
774    (253, 224, 239, 255),
775    (247, 247, 247, 255),
776    (230, 245, 208, 255),
777    (184, 225, 134, 255),
778    (127, 188, 65, 255),
779    (77, 146, 33, 255),
780    (39, 100, 25, 255),
781];
782pub const DIV_PUOR: [(u8, u8, u8, u8); 11] = [
783    (127, 59, 8, 255),
784    (179, 88, 6, 255),
785    (224, 130, 20, 255),
786    (253, 184, 99, 255),
787    (254, 224, 182, 255),
788    (247, 247, 247, 255),
789    (216, 218, 235, 255),
790    (178, 171, 210, 255),
791    (128, 115, 172, 255),
792    (84, 39, 136, 255),
793    (45, 0, 75, 255),
794];
795pub const DIV_RDBU: [(u8, u8, u8, u8); 11] = [
796    (103, 0, 31, 255),
797    (178, 24, 43, 255),
798    (214, 96, 77, 255),
799    (244, 165, 130, 255),
800    (253, 219, 199, 255),
801    (247, 247, 247, 255),
802    (209, 229, 240, 255),
803    (146, 197, 222, 255),
804    (67, 147, 195, 255),
805    (33, 102, 172, 255),
806    (5, 48, 97, 255),
807];
808pub const DIV_RDGY: [(u8, u8, u8, u8); 11] = [
809    (103, 0, 31, 255),
810    (178, 24, 43, 255),
811    (214, 96, 77, 255),
812    (244, 165, 130, 255),
813    (253, 219, 199, 255),
814    (255, 255, 255, 255),
815    (224, 224, 224, 255),
816    (186, 186, 186, 255),
817    (135, 135, 135, 255),
818    (77, 77, 77, 255),
819    (26, 26, 26, 255),
820];
821pub const DIV_RDYLBU: [(u8, u8, u8, u8); 11] = [
822    (165, 0, 38, 255),
823    (215, 48, 39, 255),
824    (244, 109, 67, 255),
825    (253, 174, 97, 255),
826    (254, 224, 144, 255),
827    (255, 255, 191, 255),
828    (224, 243, 248, 255),
829    (171, 217, 233, 255),
830    (116, 173, 209, 255),
831    (69, 117, 180, 255),
832    (49, 54, 149, 255),
833];
834pub const DIV_RDYLGN: [(u8, u8, u8, u8); 11] = [
835    (165, 0, 38, 255),
836    (215, 48, 39, 255),
837    (244, 109, 67, 255),
838    (253, 174, 97, 255),
839    (254, 224, 139, 255),
840    (255, 255, 191, 255),
841    (217, 239, 139, 255),
842    (166, 217, 106, 255),
843    (102, 189, 99, 255),
844    (26, 152, 80, 255),
845    (0, 104, 55, 255),
846];
847pub const DIV_SPECTRAL: [(u8, u8, u8, u8); 11] = [
848    (158, 1, 66, 255),
849    (213, 62, 79, 255),
850    (244, 109, 67, 255),
851    (253, 174, 97, 255),
852    (254, 224, 139, 255),
853    (255, 255, 191, 255),
854    (230, 245, 152, 255),
855    (171, 221, 164, 255),
856    (102, 194, 165, 255),
857    (50, 136, 189, 255),
858    (94, 79, 162, 255),
859];
860pub const DIV_BALANCE: [(u8, u8, u8, u8); 12] = [
861    (23, 28, 66, 255),
862    (41, 58, 143, 255),
863    (11, 102, 189, 255),
864    (69, 144, 185, 255),
865    (142, 181, 194, 255),
866    (210, 216, 219, 255),
867    (230, 210, 204, 255),
868    (213, 157, 137, 255),
869    (196, 101, 72, 255),
870    (172, 43, 36, 255),
871    (120, 14, 40, 255),
872    (60, 9, 17, 255),
873];
874pub const DIV_DELTA: [(u8, u8, u8, u8); 12] = [
875    (16, 31, 63, 255),
876    (38, 62, 144, 255),
877    (30, 110, 161, 255),
878    (60, 154, 171, 255),
879    (140, 193, 186, 255),
880    (217, 229, 218, 255),
881    (239, 226, 156, 255),
882    (195, 182, 59, 255),
883    (115, 152, 5, 255),
884    (34, 120, 36, 255),
885    (18, 78, 43, 255),
886    (23, 35, 18, 255),
887];
888pub const DIV_CURL: [(u8, u8, u8, u8); 12] = [
889    (20, 29, 67, 255),
890    (28, 72, 93, 255),
891    (18, 115, 117, 255),
892    (63, 156, 129, 255),
893    (153, 189, 156, 255),
894    (223, 225, 211, 255),
895    (241, 218, 206, 255),
896    (224, 160, 137, 255),
897    (203, 101, 99, 255),
898    (164, 54, 96, 255),
899    (111, 23, 91, 255),
900    (51, 13, 53, 255),
901];
902pub const DIV_OXY: [(u8, u8, u8, u8); 12] = [
903    (63, 5, 5, 255),
904    (101, 6, 13, 255),
905    (138, 17, 9, 255),
906    (96, 95, 95, 255),
907    (119, 118, 118, 255),
908    (142, 141, 141, 255),
909    (166, 166, 165, 255),
910    (193, 192, 191, 255),
911    (222, 222, 220, 255),
912    (239, 248, 90, 255),
913    (230, 210, 41, 255),
914    (220, 174, 25, 255),
915];
916pub const DIV_ARMYROSE: [(u8, u8, u8, u8); 7] = [
917    (121, 130, 52, 255),
918    (163, 173, 98, 255),
919    (208, 211, 162, 255),
920    (253, 251, 228, 255),
921    (240, 198, 195, 255),
922    (223, 145, 163, 255),
923    (212, 103, 128, 255),
924];
925pub const DIV_FALL: [(u8, u8, u8, u8); 7] = [
926    (61, 89, 65, 255),
927    (119, 136, 104, 255),
928    (181, 185, 145, 255),
929    (246, 237, 189, 255),
930    (237, 187, 138, 255),
931    (222, 138, 90, 255),
932    (202, 86, 44, 255),
933];
934pub const DIV_GEYSER: [(u8, u8, u8, u8); 7] = [
935    (0, 128, 128, 255),
936    (112, 164, 148, 255),
937    (180, 200, 168, 255),
938    (246, 237, 189, 255),
939    (237, 187, 138, 255),
940    (222, 138, 90, 255),
941    (202, 86, 44, 255),
942];
943pub const DIV_TEMPS: [(u8, u8, u8, u8); 7] = [
944    (0, 147, 146, 255),
945    (57, 177, 133, 255),
946    (156, 203, 134, 255),
947    (233, 226, 156, 255),
948    (238, 180, 121, 255),
949    (232, 132, 113, 255),
950    (207, 89, 126, 255),
951];
952pub const DIV_TEALROSE: [(u8, u8, u8, u8); 7] = [
953    (0, 147, 146, 255),
954    (114, 170, 161, 255),
955    (177, 199, 179, 255),
956    (241, 234, 200, 255),
957    (229, 185, 173, 255),
958    (217, 137, 148, 255),
959    (208, 88, 126, 255),
960];
961pub const DIV_TROPIC: [(u8, u8, u8, u8); 7] = [
962    (0, 155, 158, 255),
963    (66, 183, 185, 255),
964    (167, 211, 212, 255),
965    (241, 241, 241, 255),
966    (228, 193, 217, 255),
967    (214, 145, 193, 255),
968    (199, 93, 171, 255),
969];
970pub const DIV_EARTH: [(u8, u8, u8, u8); 7] = [
971    (161, 105, 40, 255),
972    (189, 146, 90, 255),
973    (214, 189, 141, 255),
974    (237, 234, 194, 255),
975    (181, 200, 184, 255),
976    (121, 167, 172, 255),
977    (40, 135, 161, 255),
978];
979pub const DIV_PICNIC: [(u8, u8, u8, u8); 11] = [
980    (0, 0, 255, 255),
981    (51, 153, 255, 255),
982    (102, 204, 255, 255),
983    (153, 204, 255, 255),
984    (204, 204, 255, 255),
985    (255, 255, 255, 255),
986    (255, 204, 255, 255),
987    (255, 153, 255, 255),
988    (255, 102, 204, 255),
989    (255, 102, 102, 255),
990    (255, 0, 0, 255),
991];
992pub const DIV_PORTLAND: [(u8, u8, u8, u8); 5] = [
993    (12, 51, 131, 255),
994    (10, 136, 186, 255),
995    (242, 211, 56, 255),
996    (242, 143, 56, 255),
997    (217, 30, 30, 255),
998];
999
1000pub const SEQ_PLOTLY3: [(u8, u8, u8, u8); 13] = [
1001    (5, 8, 184, 255),
1002    (25, 16, 216, 255),
1003    (60, 25, 240, 255),
1004    (107, 28, 251, 255),
1005    (152, 28, 253, 255),
1006    (191, 28, 253, 255),
1007    (221, 43, 253, 255),
1008    (242, 70, 254, 255),
1009    (252, 103, 253, 255),
1010    (254, 136, 252, 255),
1011    (254, 165, 253, 255),
1012    (254, 190, 254, 255),
1013    (254, 195, 254, 255),
1014];
1015pub const SEQ_VIRIDIS: [(u8, u8, u8, u8); 10] = [
1016    (68, 1, 84, 255),
1017    (72, 40, 120, 255),
1018    (62, 73, 137, 255),
1019    (49, 104, 142, 255),
1020    (38, 130, 142, 255),
1021    (31, 158, 137, 255),
1022    (53, 183, 121, 255),
1023    (110, 206, 88, 255),
1024    (181, 222, 43, 255),
1025    (253, 231, 37, 255),
1026];
1027pub const SEQ_CIVIDIS: [(u8, u8, u8, u8); 10] = [
1028    (0, 34, 78, 255),
1029    (18, 53, 112, 255),
1030    (59, 73, 108, 255),
1031    (87, 93, 109, 255),
1032    (112, 113, 115, 255),
1033    (138, 134, 120, 255),
1034    (165, 156, 116, 255),
1035    (195, 179, 105, 255),
1036    (225, 204, 85, 255),
1037    (254, 232, 56, 255),
1038];
1039pub const SEQ_INFERNO: [(u8, u8, u8, u8); 10] = [
1040    (0, 0, 4, 255),
1041    (27, 12, 65, 255),
1042    (74, 12, 107, 255),
1043    (120, 28, 109, 255),
1044    (165, 44, 96, 255),
1045    (207, 68, 70, 255),
1046    (237, 105, 37, 255),
1047    (251, 155, 6, 255),
1048    (247, 209, 61, 255),
1049    (252, 255, 164, 255),
1050];
1051pub const SEQ_MAGMA: [(u8, u8, u8, u8); 10] = [
1052    (0, 0, 4, 255),
1053    (24, 15, 61, 255),
1054    (68, 15, 118, 255),
1055    (114, 31, 129, 255),
1056    (158, 47, 127, 255),
1057    (205, 64, 113, 255),
1058    (241, 96, 93, 255),
1059    (253, 150, 104, 255),
1060    (254, 202, 141, 255),
1061    (252, 253, 191, 255),
1062];
1063pub const SEQ_PLASMA: [(u8, u8, u8, u8); 10] = [
1064    (13, 8, 135, 255),
1065    (70, 3, 159, 255),
1066    (114, 1, 168, 255),
1067    (156, 23, 158, 255),
1068    (189, 55, 134, 255),
1069    (216, 87, 107, 255),
1070    (237, 121, 83, 255),
1071    (251, 159, 58, 255),
1072    (253, 202, 38, 255),
1073    (240, 249, 33, 255),
1074];
1075pub const SEQ_TURBO: [(u8, u8, u8, u8); 15] = [
1076    (48, 18, 59, 255),
1077    (65, 69, 171, 255),
1078    (70, 117, 237, 255),
1079    (57, 162, 252, 255),
1080    (27, 207, 212, 255),
1081    (36, 236, 166, 255),
1082    (97, 252, 108, 255),
1083    (164, 252, 59, 255),
1084    (209, 232, 52, 255),
1085    (243, 198, 58, 255),
1086    (254, 155, 45, 255),
1087    (243, 99, 21, 255),
1088    (217, 56, 6, 255),
1089    (177, 25, 1, 255),
1090    (122, 4, 2, 255),
1091];
1092pub const SEQ_BLACKBODY: [(u8, u8, u8, u8); 5] = [
1093    (0, 0, 0, 255),
1094    (230, 0, 0, 255),
1095    (230, 210, 0, 255),
1096    (255, 255, 255, 255),
1097    (160, 200, 255, 255),
1098];
1099pub const SEQ_BLUERED: [(u8, u8, u8, u8); 2] = [(0, 0, 255, 255), (255, 0, 0, 255)];
1100pub const SEQ_ELECTRIC: [(u8, u8, u8, u8); 6] = [
1101    (0, 0, 0, 255),
1102    (30, 0, 100, 255),
1103    (120, 0, 100, 255),
1104    (160, 90, 0, 255),
1105    (230, 200, 0, 255),
1106    (255, 250, 220, 255),
1107];
1108pub const SEQ_HOT: [(u8, u8, u8, u8); 4] = [
1109    (0, 0, 0, 255),
1110    (230, 0, 0, 255),
1111    (255, 210, 0, 255),
1112    (255, 255, 255, 255),
1113];
1114pub const SEQ_JET: [(u8, u8, u8, u8); 6] = [
1115    (0, 0, 131, 255),
1116    (0, 60, 170, 255),
1117    (5, 255, 255, 255),
1118    (255, 255, 0, 255),
1119    (250, 0, 0, 255),
1120    (128, 0, 0, 255),
1121];
1122pub const SEQ_RAINBOW: [(u8, u8, u8, u8); 9] = [
1123    (150, 0, 90, 255),
1124    (0, 0, 200, 255),
1125    (0, 25, 255, 255),
1126    (0, 152, 255, 255),
1127    (44, 255, 150, 255),
1128    (151, 255, 0, 255),
1129    (255, 234, 0, 255),
1130    (255, 111, 0, 255),
1131    (255, 0, 0, 255),
1132];
1133pub const SEQ_BLUES: [(u8, u8, u8, u8); 9] = [
1134    (247, 251, 255, 255),
1135    (222, 235, 247, 255),
1136    (198, 219, 239, 255),
1137    (158, 202, 225, 255),
1138    (107, 174, 214, 255),
1139    (66, 146, 198, 255),
1140    (33, 113, 181, 255),
1141    (8, 81, 156, 255),
1142    (8, 48, 107, 255),
1143];
1144pub const SEQ_BUGN: [(u8, u8, u8, u8); 9] = [
1145    (247, 252, 253, 255),
1146    (229, 245, 249, 255),
1147    (204, 236, 230, 255),
1148    (153, 216, 201, 255),
1149    (102, 194, 164, 255),
1150    (65, 174, 118, 255),
1151    (35, 139, 69, 255),
1152    (0, 109, 44, 255),
1153    (0, 68, 27, 255),
1154];
1155pub const SEQ_BUPU: [(u8, u8, u8, u8); 9] = [
1156    (247, 252, 253, 255),
1157    (224, 236, 244, 255),
1158    (191, 211, 230, 255),
1159    (158, 188, 218, 255),
1160    (140, 150, 198, 255),
1161    (140, 107, 177, 255),
1162    (136, 65, 157, 255),
1163    (129, 15, 124, 255),
1164    (77, 0, 75, 255),
1165];
1166pub const SEQ_GNBU: [(u8, u8, u8, u8); 9] = [
1167    (247, 252, 240, 255),
1168    (224, 243, 219, 255),
1169    (204, 235, 197, 255),
1170    (168, 221, 181, 255),
1171    (123, 204, 196, 255),
1172    (78, 179, 211, 255),
1173    (43, 140, 190, 255),
1174    (8, 104, 172, 255),
1175    (8, 64, 129, 255),
1176];
1177pub const SEQ_GREENS: [(u8, u8, u8, u8); 9] = [
1178    (247, 252, 245, 255),
1179    (229, 245, 224, 255),
1180    (199, 233, 192, 255),
1181    (161, 217, 155, 255),
1182    (116, 196, 118, 255),
1183    (65, 171, 93, 255),
1184    (35, 139, 69, 255),
1185    (0, 109, 44, 255),
1186    (0, 68, 27, 255),
1187];
1188pub const SEQ_GREYS: [(u8, u8, u8, u8); 9] = [
1189    (255, 255, 255, 255),
1190    (240, 240, 240, 255),
1191    (217, 217, 217, 255),
1192    (189, 189, 189, 255),
1193    (150, 150, 150, 255),
1194    (115, 115, 115, 255),
1195    (82, 82, 82, 255),
1196    (37, 37, 37, 255),
1197    (0, 0, 0, 255),
1198];
1199pub const SEQ_ORRD: [(u8, u8, u8, u8); 9] = [
1200    (255, 247, 236, 255),
1201    (254, 232, 200, 255),
1202    (253, 212, 158, 255),
1203    (253, 187, 132, 255),
1204    (252, 141, 89, 255),
1205    (239, 101, 72, 255),
1206    (215, 48, 31, 255),
1207    (179, 0, 0, 255),
1208    (127, 0, 0, 255),
1209];
1210pub const SEQ_ORANGES: [(u8, u8, u8, u8); 9] = [
1211    (255, 245, 235, 255),
1212    (254, 230, 206, 255),
1213    (253, 208, 162, 255),
1214    (253, 174, 107, 255),
1215    (253, 141, 60, 255),
1216    (241, 105, 19, 255),
1217    (217, 72, 1, 255),
1218    (166, 54, 3, 255),
1219    (127, 39, 4, 255),
1220];
1221pub const SEQ_PUBU: [(u8, u8, u8, u8); 9] = [
1222    (255, 247, 251, 255),
1223    (236, 231, 242, 255),
1224    (208, 209, 230, 255),
1225    (166, 189, 219, 255),
1226    (116, 169, 207, 255),
1227    (54, 144, 192, 255),
1228    (5, 112, 176, 255),
1229    (4, 90, 141, 255),
1230    (2, 56, 88, 255),
1231];
1232pub const SEQ_PUBUGN: [(u8, u8, u8, u8); 9] = [
1233    (255, 247, 251, 255),
1234    (236, 226, 240, 255),
1235    (208, 209, 230, 255),
1236    (166, 189, 219, 255),
1237    (103, 169, 207, 255),
1238    (54, 144, 192, 255),
1239    (2, 129, 138, 255),
1240    (1, 108, 89, 255),
1241    (1, 70, 54, 255),
1242];
1243pub const SEQ_PURD: [(u8, u8, u8, u8); 9] = [
1244    (247, 244, 249, 255),
1245    (231, 225, 239, 255),
1246    (212, 185, 218, 255),
1247    (201, 148, 199, 255),
1248    (223, 101, 176, 255),
1249    (231, 41, 138, 255),
1250    (206, 18, 86, 255),
1251    (152, 0, 67, 255),
1252    (103, 0, 31, 255),
1253];
1254pub const SEQ_PURPLES: [(u8, u8, u8, u8); 9] = [
1255    (252, 251, 253, 255),
1256    (239, 237, 245, 255),
1257    (218, 218, 235, 255),
1258    (188, 189, 220, 255),
1259    (158, 154, 200, 255),
1260    (128, 125, 186, 255),
1261    (106, 81, 163, 255),
1262    (84, 39, 143, 255),
1263    (63, 0, 125, 255),
1264];
1265pub const SEQ_RDBU: [(u8, u8, u8, u8); 11] = [
1266    (103, 0, 31, 255),
1267    (178, 24, 43, 255),
1268    (214, 96, 77, 255),
1269    (244, 165, 130, 255),
1270    (253, 219, 199, 255),
1271    (247, 247, 247, 255),
1272    (209, 229, 240, 255),
1273    (146, 197, 222, 255),
1274    (67, 147, 195, 255),
1275    (33, 102, 172, 255),
1276    (5, 48, 97, 255),
1277];
1278pub const SEQ_RDPU: [(u8, u8, u8, u8); 9] = [
1279    (255, 247, 243, 255),
1280    (253, 224, 221, 255),
1281    (252, 197, 192, 255),
1282    (250, 159, 181, 255),
1283    (247, 104, 161, 255),
1284    (221, 52, 151, 255),
1285    (174, 1, 126, 255),
1286    (122, 1, 119, 255),
1287    (73, 0, 106, 255),
1288];
1289pub const SEQ_REDS: [(u8, u8, u8, u8); 9] = [
1290    (255, 245, 240, 255),
1291    (254, 224, 210, 255),
1292    (252, 187, 161, 255),
1293    (252, 146, 114, 255),
1294    (251, 106, 74, 255),
1295    (239, 59, 44, 255),
1296    (203, 24, 29, 255),
1297    (165, 15, 21, 255),
1298    (103, 0, 13, 255),
1299];
1300pub const SEQ_YLGN: [(u8, u8, u8, u8); 9] = [
1301    (255, 255, 229, 255),
1302    (247, 252, 185, 255),
1303    (217, 240, 163, 255),
1304    (173, 221, 142, 255),
1305    (120, 198, 121, 255),
1306    (65, 171, 93, 255),
1307    (35, 132, 67, 255),
1308    (0, 104, 55, 255),
1309    (0, 69, 41, 255),
1310];
1311pub const SEQ_YLGNBU: [(u8, u8, u8, u8); 9] = [
1312    (255, 255, 217, 255),
1313    (237, 248, 177, 255),
1314    (199, 233, 180, 255),
1315    (127, 205, 187, 255),
1316    (65, 182, 196, 255),
1317    (29, 145, 192, 255),
1318    (34, 94, 168, 255),
1319    (37, 52, 148, 255),
1320    (8, 29, 88, 255),
1321];
1322pub const SEQ_YLORBR: [(u8, u8, u8, u8); 9] = [
1323    (255, 255, 229, 255),
1324    (255, 247, 188, 255),
1325    (254, 227, 145, 255),
1326    (254, 196, 79, 255),
1327    (254, 153, 41, 255),
1328    (236, 112, 20, 255),
1329    (204, 76, 2, 255),
1330    (153, 52, 4, 255),
1331    (102, 37, 6, 255),
1332];
1333pub const SEQ_YLORRD: [(u8, u8, u8, u8); 9] = [
1334    (255, 255, 204, 255),
1335    (255, 237, 160, 255),
1336    (254, 217, 118, 255),
1337    (254, 178, 76, 255),
1338    (253, 141, 60, 255),
1339    (252, 78, 42, 255),
1340    (227, 26, 28, 255),
1341    (189, 0, 38, 255),
1342    (128, 0, 38, 255),
1343];
1344pub const SEQ_TURBID: [(u8, u8, u8, u8); 12] = [
1345    (232, 245, 171, 255),
1346    (220, 219, 137, 255),
1347    (209, 193, 107, 255),
1348    (199, 168, 83, 255),
1349    (186, 143, 66, 255),
1350    (170, 121, 60, 255),
1351    (151, 103, 58, 255),
1352    (129, 87, 56, 255),
1353    (104, 72, 53, 255),
1354    (80, 59, 46, 255),
1355    (57, 45, 37, 255),
1356    (34, 30, 27, 255),
1357];
1358pub const SEQ_THERMAL: [(u8, u8, u8, u8); 12] = [
1359    (3, 35, 51, 255),
1360    (13, 48, 100, 255),
1361    (53, 50, 155, 255),
1362    (93, 62, 153, 255),
1363    (126, 77, 143, 255),
1364    (158, 89, 135, 255),
1365    (193, 100, 121, 255),
1366    (225, 113, 97, 255),
1367    (246, 139, 69, 255),
1368    (251, 173, 60, 255),
1369    (246, 211, 70, 255),
1370    (231, 250, 90, 255),
1371];
1372pub const SEQ_HALINE: [(u8, u8, u8, u8); 12] = [
1373    (41, 24, 107, 255),
1374    (42, 35, 160, 255),
1375    (15, 71, 153, 255),
1376    (18, 95, 142, 255),
1377    (38, 116, 137, 255),
1378    (53, 136, 136, 255),
1379    (65, 157, 133, 255),
1380    (81, 178, 124, 255),
1381    (111, 198, 107, 255),
1382    (160, 214, 91, 255),
1383    (212, 225, 112, 255),
1384    (253, 238, 153, 255),
1385];
1386pub const SEQ_SOLAR: [(u8, u8, u8, u8); 12] = [
1387    (51, 19, 23, 255),
1388    (79, 28, 33, 255),
1389    (108, 36, 36, 255),
1390    (135, 47, 32, 255),
1391    (157, 66, 25, 255),
1392    (174, 88, 20, 255),
1393    (188, 111, 19, 255),
1394    (199, 137, 22, 255),
1395    (209, 164, 32, 255),
1396    (217, 192, 44, 255),
1397    (222, 222, 59, 255),
1398    (224, 253, 74, 255),
1399];
1400pub const SEQ_ICE: [(u8, u8, u8, u8); 12] = [
1401    (3, 5, 18, 255),
1402    (25, 25, 51, 255),
1403    (44, 42, 87, 255),
1404    (58, 60, 125, 255),
1405    (62, 83, 160, 255),
1406    (62, 109, 178, 255),
1407    (72, 134, 187, 255),
1408    (89, 159, 196, 255),
1409    (114, 184, 205, 255),
1410    (149, 207, 216, 255),
1411    (192, 229, 232, 255),
1412    (234, 252, 253, 255),
1413];
1414pub const SEQ_GRAY: [(u8, u8, u8, u8); 12] = [
1415    (0, 0, 0, 255),
1416    (16, 16, 16, 255),
1417    (38, 38, 38, 255),
1418    (59, 59, 59, 255),
1419    (81, 80, 80, 255),
1420    (102, 101, 101, 255),
1421    (124, 123, 122, 255),
1422    (146, 146, 145, 255),
1423    (171, 171, 170, 255),
1424    (197, 197, 195, 255),
1425    (224, 224, 223, 255),
1426    (254, 254, 253, 255),
1427];
1428pub const SEQ_DEEP: [(u8, u8, u8, u8); 12] = [
1429    (253, 253, 204, 255),
1430    (206, 236, 179, 255),
1431    (156, 219, 165, 255),
1432    (111, 201, 163, 255),
1433    (86, 177, 163, 255),
1434    (76, 153, 160, 255),
1435    (68, 130, 155, 255),
1436    (62, 108, 150, 255),
1437    (62, 82, 143, 255),
1438    (64, 60, 115, 255),
1439    (54, 43, 77, 255),
1440    (39, 26, 44, 255),
1441];
1442pub const SEQ_DENSE: [(u8, u8, u8, u8); 12] = [
1443    (230, 240, 240, 255),
1444    (191, 221, 229, 255),
1445    (156, 201, 226, 255),
1446    (129, 180, 227, 255),
1447    (115, 154, 228, 255),
1448    (117, 127, 221, 255),
1449    (120, 100, 202, 255),
1450    (119, 74, 175, 255),
1451    (113, 50, 141, 255),
1452    (100, 31, 104, 255),
1453    (80, 20, 66, 255),
1454    (54, 14, 36, 255),
1455];
1456pub const SEQ_ALGAE: [(u8, u8, u8, u8); 12] = [
1457    (214, 249, 207, 255),
1458    (186, 228, 174, 255),
1459    (156, 209, 143, 255),
1460    (124, 191, 115, 255),
1461    (85, 174, 91, 255),
1462    (37, 157, 81, 255),
1463    (7, 138, 78, 255),
1464    (13, 117, 71, 255),
1465    (23, 95, 61, 255),
1466    (25, 75, 49, 255),
1467    (23, 55, 35, 255),
1468    (17, 36, 20, 255),
1469];
1470pub const SEQ_MATTER: [(u8, u8, u8, u8); 12] = [
1471    (253, 237, 176, 255),
1472    (250, 205, 145, 255),
1473    (246, 173, 119, 255),
1474    (240, 142, 98, 255),
1475    (231, 109, 84, 255),
1476    (216, 80, 83, 255),
1477    (195, 56, 90, 255),
1478    (168, 40, 96, 255),
1479    (138, 29, 99, 255),
1480    (107, 24, 93, 255),
1481    (76, 21, 80, 255),
1482    (47, 15, 61, 255),
1483];
1484pub const SEQ_SPEED: [(u8, u8, u8, u8); 12] = [
1485    (254, 252, 205, 255),
1486    (239, 225, 156, 255),
1487    (221, 201, 106, 255),
1488    (194, 182, 59, 255),
1489    (157, 167, 21, 255),
1490    (116, 153, 5, 255),
1491    (75, 138, 20, 255),
1492    (35, 121, 36, 255),
1493    (11, 100, 44, 255),
1494    (18, 78, 43, 255),
1495    (25, 56, 34, 255),
1496    (23, 35, 18, 255),
1497];
1498pub const SEQ_AMP: [(u8, u8, u8, u8); 12] = [
1499    (241, 236, 236, 255),
1500    (230, 209, 203, 255),
1501    (221, 182, 170, 255),
1502    (213, 156, 137, 255),
1503    (205, 129, 103, 255),
1504    (196, 102, 73, 255),
1505    (186, 74, 47, 255),
1506    (172, 44, 36, 255),
1507    (149, 19, 39, 255),
1508    (120, 14, 40, 255),
1509    (89, 13, 31, 255),
1510    (60, 9, 17, 255),
1511];
1512pub const SEQ_TEMPO: [(u8, u8, u8, u8); 12] = [
1513    (254, 245, 244, 255),
1514    (222, 224, 210, 255),
1515    (189, 206, 181, 255),
1516    (153, 189, 156, 255),
1517    (110, 173, 138, 255),
1518    (65, 157, 129, 255),
1519    (25, 137, 125, 255),
1520    (18, 116, 117, 255),
1521    (25, 94, 106, 255),
1522    (28, 72, 93, 255),
1523    (25, 51, 80, 255),
1524    (20, 29, 67, 255),
1525];
1526pub const SEQ_BURG: [(u8, u8, u8, u8); 7] = [
1527    (255, 198, 196, 255),
1528    (244, 163, 168, 255),
1529    (227, 129, 145, 255),
1530    (204, 96, 125, 255),
1531    (173, 70, 108, 255),
1532    (139, 48, 88, 255),
1533    (103, 32, 68, 255),
1534];
1535pub const SEQ_BURGYL: [(u8, u8, u8, u8); 7] = [
1536    (251, 230, 197, 255),
1537    (245, 186, 152, 255),
1538    (238, 138, 130, 255),
1539    (220, 113, 118, 255),
1540    (200, 88, 108, 255),
1541    (156, 63, 93, 255),
1542    (112, 40, 74, 255),
1543];
1544pub const SEQ_REDOR: [(u8, u8, u8, u8); 7] = [
1545    (246, 210, 169, 255),
1546    (245, 183, 142, 255),
1547    (241, 156, 124, 255),
1548    (234, 129, 113, 255),
1549    (221, 104, 108, 255),
1550    (202, 82, 104, 255),
1551    (177, 63, 100, 255),
1552];
1553pub const SEQ_ORYEL: [(u8, u8, u8, u8); 7] = [
1554    (236, 218, 154, 255),
1555    (239, 196, 126, 255),
1556    (243, 173, 106, 255),
1557    (247, 148, 93, 255),
1558    (249, 123, 87, 255),
1559    (246, 99, 86, 255),
1560    (238, 77, 90, 255),
1561];
1562pub const SEQ_PEACH: [(u8, u8, u8, u8); 7] = [
1563    (253, 224, 197, 255),
1564    (250, 203, 166, 255),
1565    (248, 181, 139, 255),
1566    (245, 158, 114, 255),
1567    (242, 133, 93, 255),
1568    (239, 106, 76, 255),
1569    (235, 74, 64, 255),
1570];
1571pub const SEQ_PINKYL: [(u8, u8, u8, u8); 7] = [
1572    (254, 246, 181, 255),
1573    (255, 221, 154, 255),
1574    (255, 194, 133, 255),
1575    (255, 166, 121, 255),
1576    (250, 138, 118, 255),
1577    (241, 109, 122, 255),
1578    (225, 83, 131, 255),
1579];
1580pub const SEQ_MINT: [(u8, u8, u8, u8); 7] = [
1581    (228, 241, 225, 255),
1582    (180, 217, 204, 255),
1583    (137, 192, 182, 255),
1584    (99, 166, 160, 255),
1585    (68, 140, 138, 255),
1586    (40, 114, 116, 255),
1587    (13, 88, 95, 255),
1588];
1589pub const SEQ_BLUGRN: [(u8, u8, u8, u8); 7] = [
1590    (196, 230, 195, 255),
1591    (150, 210, 164, 255),
1592    (109, 188, 144, 255),
1593    (77, 162, 132, 255),
1594    (54, 135, 122, 255),
1595    (38, 107, 110, 255),
1596    (29, 79, 96, 255),
1597];
1598pub const SEQ_DARKMINT: [(u8, u8, u8, u8); 7] = [
1599    (210, 251, 212, 255),
1600    (165, 219, 194, 255),
1601    (123, 188, 176, 255),
1602    (85, 156, 158, 255),
1603    (58, 124, 137, 255),
1604    (35, 93, 114, 255),
1605    (18, 63, 90, 255),
1606];
1607pub const SEQ_EMRLD: [(u8, u8, u8, u8); 7] = [
1608    (211, 242, 163, 255),
1609    (151, 225, 150, 255),
1610    (108, 192, 139, 255),
1611    (76, 155, 130, 255),
1612    (33, 122, 121, 255),
1613    (16, 89, 101, 255),
1614    (7, 64, 80, 255),
1615];
1616pub const SEQ_AGGRNYL: [(u8, u8, u8, u8); 7] = [
1617    (36, 86, 104, 255),
1618    (15, 114, 121, 255),
1619    (13, 143, 129, 255),
1620    (57, 171, 126, 255),
1621    (110, 197, 116, 255),
1622    (169, 220, 103, 255),
1623    (237, 239, 93, 255),
1624];
1625pub const SEQ_BLUYL: [(u8, u8, u8, u8); 7] = [
1626    (247, 254, 174, 255),
1627    (183, 230, 165, 255),
1628    (124, 203, 162, 255),
1629    (70, 174, 160, 255),
1630    (8, 144, 153, 255),
1631    (0, 113, 139, 255),
1632    (4, 82, 117, 255),
1633];
1634pub const SEQ_TEAL: [(u8, u8, u8, u8); 7] = [
1635    (209, 238, 234, 255),
1636    (168, 219, 217, 255),
1637    (133, 196, 201, 255),
1638    (104, 171, 184, 255),
1639    (79, 144, 166, 255),
1640    (59, 115, 143, 255),
1641    (42, 86, 116, 255),
1642];
1643pub const SEQ_TEALGRN: [(u8, u8, u8, u8); 7] = [
1644    (176, 242, 188, 255),
1645    (137, 232, 172, 255),
1646    (103, 219, 165, 255),
1647    (76, 200, 163, 255),
1648    (56, 178, 163, 255),
1649    (44, 152, 160, 255),
1650    (37, 125, 152, 255),
1651];
1652pub const SEQ_PURP: [(u8, u8, u8, u8); 7] = [
1653    (243, 224, 247, 255),
1654    (228, 199, 241, 255),
1655    (209, 175, 232, 255),
1656    (185, 152, 221, 255),
1657    (159, 130, 206, 255),
1658    (130, 109, 186, 255),
1659    (99, 88, 159, 255),
1660];
1661pub const SEQ_PURPOR: [(u8, u8, u8, u8); 7] = [
1662    (249, 221, 218, 255),
1663    (242, 185, 196, 255),
1664    (229, 151, 185, 255),
1665    (206, 120, 179, 255),
1666    (173, 95, 173, 255),
1667    (131, 75, 160, 255),
1668    (87, 59, 136, 255),
1669];
1670pub const SEQ_SUNSET: [(u8, u8, u8, u8); 7] = [
1671    (243, 231, 155, 255),
1672    (250, 196, 132, 255),
1673    (248, 160, 126, 255),
1674    (235, 127, 134, 255),
1675    (206, 102, 147, 255),
1676    (160, 89, 160, 255),
1677    (92, 83, 165, 255),
1678];
1679pub const SEQ_MAGENTA: [(u8, u8, u8, u8); 7] = [
1680    (243, 203, 211, 255),
1681    (234, 169, 189, 255),
1682    (221, 136, 172, 255),
1683    (202, 105, 157, 255),
1684    (177, 77, 142, 255),
1685    (145, 53, 125, 255),
1686    (108, 33, 103, 255),
1687];
1688pub const SEQ_SUNSETDARK: [(u8, u8, u8, u8); 7] = [
1689    (252, 222, 156, 255),
1690    (250, 164, 118, 255),
1691    (240, 116, 110, 255),
1692    (227, 79, 111, 255),
1693    (220, 57, 119, 255),
1694    (185, 37, 122, 255),
1695    (124, 29, 111, 255),
1696];
1697pub const SEQ_AGSUNSET: [(u8, u8, u8, u8); 7] = [
1698    (75, 41, 145, 255),
1699    (135, 44, 162, 255),
1700    (192, 54, 157, 255),
1701    (234, 79, 136, 255),
1702    (250, 120, 118, 255),
1703    (246, 169, 122, 255),
1704    (237, 217, 163, 255),
1705];
1706pub const SEQ_BRWNYL: [(u8, u8, u8, u8); 7] = [
1707    (237, 229, 207, 255),
1708    (224, 194, 162, 255),
1709    (211, 156, 131, 255),
1710    (193, 118, 111, 255),
1711    (166, 84, 97, 255),
1712    (129, 55, 83, 255),
1713    (84, 31, 63, 255),
1714];
1715
1716#[cfg(test)]
1717mod tests {
1718    use std::str::FromStr;
1719
1720    #[allow(unused_imports)]
1721    use pretty_assertions::{assert_eq, assert_ne, assert_str_eq};
1722    use strum::{IntoEnumIterator, VariantNames};
1723
1724    #[allow(unused_imports)]
1725    use super::*;
1726
1727    #[cfg_attr(feature = "strum", test)]
1728    fn test_strum() {
1729        assert_eq!(Numerical::from_repr(0).unwrap(), Numerical::Ratio);
1730        assert_eq!(Numerical::from_str("Ratio").unwrap(), Numerical::Ratio);
1731        assert_eq!("Ratio", format!("{}", Numerical::Ratio));
1732        assert_eq!(
1733            Numerical::VARIANTS.to_vec(),
1734            Numerical::iter()
1735                .map(|v| format!("{v}"))
1736                .collect::<Vec<_>>()
1737        );
1738    }
1739}