1 use crate::cubehelix::{self, Cubehelix};
2 use crate::gradient::EvalGradient;
3 use crate::sequential::Sequential;
4 use crate::{interpolate, Color, Gradient};
5 
6 /// ​
7 ///
8 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/turbo.png" width="100%" height="40" alt="turbo">
9 pub const TURBO: Gradient = Gradient { eval: &Turbo };
10 
11 struct Turbo;
12 
13 impl EvalGradient for Turbo {
name(&self) -> &'static str14     fn name(&self) -> &'static str {
15         "Turbo"
16     }
17 
eval_continuous(&self, t: f64) -> Color18     fn eval_continuous(&self, t: f64) -> Color {
19         let r = (34.61
20             + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05)))))
21             .max(0.0)
22             .min(255.0) as u8;
23         let g = (23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56)))))
24             .max(0.0)
25             .min(255.0) as u8;
26         let b = (27.2
27             + t * (3211.1 - t * (15327.97 - t * (27814.0 - t * (22569.18 - t * 6838.66)))))
28             .max(0.0)
29             .min(255.0) as u8;
30         Color { r, g, b }
31     }
32 }
33 
34 struct Ramp {
35     name: &'static str,
36     colors: [Color; 256],
37 }
38 
39 impl EvalGradient for Ramp {
name(&self) -> &'static str40     fn name(&self) -> &'static str {
41         self.name
42     }
43 
eval_continuous(&self, t: f64) -> Color44     fn eval_continuous(&self, t: f64) -> Color {
45         interpolate::spline(&self.colors, t)
46     }
47 }
48 
49 /// &#8203;
50 ///
51 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/viridis.png" width="100%" height="40" alt="viridis">
52 pub const VIRIDIS: Gradient = Gradient {
53     eval: &Ramp {
54         name: "Viridis",
55         colors: colors! {
56             0x440154 0x440256 0x450457 0x450559 0x46075a 0x46085c 0x460a5d 0x460b5e
57             0x470d60 0x470e61 0x471063 0x471164 0x471365 0x481467 0x481668 0x481769
58             0x48186a 0x481a6c 0x481b6d 0x481c6e 0x481d6f 0x481f70 0x482071 0x482173
59             0x482374 0x482475 0x482576 0x482677 0x482878 0x482979 0x472a7a 0x472c7a
60             0x472d7b 0x472e7c 0x472f7d 0x46307e 0x46327e 0x46337f 0x463480 0x453581
61             0x453781 0x453882 0x443983 0x443a83 0x443b84 0x433d84 0x433e85 0x423f85
62             0x424086 0x424186 0x414287 0x414487 0x404588 0x404688 0x3f4788 0x3f4889
63             0x3e4989 0x3e4a89 0x3e4c8a 0x3d4d8a 0x3d4e8a 0x3c4f8a 0x3c508b 0x3b518b
64             0x3b528b 0x3a538b 0x3a548c 0x39558c 0x39568c 0x38588c 0x38598c 0x375a8c
65             0x375b8d 0x365c8d 0x365d8d 0x355e8d 0x355f8d 0x34608d 0x34618d 0x33628d
66             0x33638d 0x32648e 0x32658e 0x31668e 0x31678e 0x31688e 0x30698e 0x306a8e
67             0x2f6b8e 0x2f6c8e 0x2e6d8e 0x2e6e8e 0x2e6f8e 0x2d708e 0x2d718e 0x2c718e
68             0x2c728e 0x2c738e 0x2b748e 0x2b758e 0x2a768e 0x2a778e 0x2a788e 0x29798e
69             0x297a8e 0x297b8e 0x287c8e 0x287d8e 0x277e8e 0x277f8e 0x27808e 0x26818e
70             0x26828e 0x26828e 0x25838e 0x25848e 0x25858e 0x24868e 0x24878e 0x23888e
71             0x23898e 0x238a8d 0x228b8d 0x228c8d 0x228d8d 0x218e8d 0x218f8d 0x21908d
72             0x21918c 0x20928c 0x20928c 0x20938c 0x1f948c 0x1f958b 0x1f968b 0x1f978b
73             0x1f988b 0x1f998a 0x1f9a8a 0x1e9b8a 0x1e9c89 0x1e9d89 0x1f9e89 0x1f9f88
74             0x1fa088 0x1fa188 0x1fa187 0x1fa287 0x20a386 0x20a486 0x21a585 0x21a685
75             0x22a785 0x22a884 0x23a983 0x24aa83 0x25ab82 0x25ac82 0x26ad81 0x27ad81
76             0x28ae80 0x29af7f 0x2ab07f 0x2cb17e 0x2db27d 0x2eb37c 0x2fb47c 0x31b57b
77             0x32b67a 0x34b679 0x35b779 0x37b878 0x38b977 0x3aba76 0x3bbb75 0x3dbc74
78             0x3fbc73 0x40bd72 0x42be71 0x44bf70 0x46c06f 0x48c16e 0x4ac16d 0x4cc26c
79             0x4ec36b 0x50c46a 0x52c569 0x54c568 0x56c667 0x58c765 0x5ac864 0x5cc863
80             0x5ec962 0x60ca60 0x63cb5f 0x65cb5e 0x67cc5c 0x69cd5b 0x6ccd5a 0x6ece58
81             0x70cf57 0x73d056 0x75d054 0x77d153 0x7ad151 0x7cd250 0x7fd34e 0x81d34d
82             0x84d44b 0x86d549 0x89d548 0x8bd646 0x8ed645 0x90d743 0x93d741 0x95d840
83             0x98d83e 0x9bd93c 0x9dd93b 0xa0da39 0xa2da37 0xa5db36 0xa8db34 0xaadc32
84             0xaddc30 0xb0dd2f 0xb2dd2d 0xb5de2b 0xb8de29 0xbade28 0xbddf26 0xc0df25
85             0xc2df23 0xc5e021 0xc8e020 0xcae11f 0xcde11d 0xd0e11c 0xd2e21b 0xd5e21a
86             0xd8e219 0xdae319 0xdde318 0xdfe318 0xe2e418 0xe5e419 0xe7e419 0xeae51a
87             0xece51b 0xefe51c 0xf1e51d 0xf4e61e 0xf6e620 0xf8e621 0xfbe723 0xfde725
88         },
89     },
90 };
91 
92 /// &#8203;
93 ///
94 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/inferno.png" width="100%" height="40" alt="inferno">
95 pub const INFERNO: Gradient = Gradient {
96     eval: &Ramp {
97         name: "Inferno",
98         colors: colors! {
99             0x000004 0x010005 0x010106 0x010108 0x02010a 0x02020c 0x02020e 0x030210
100             0x040312 0x040314 0x050417 0x060419 0x07051b 0x08051d 0x09061f 0x0a0722
101             0x0b0724 0x0c0826 0x0d0829 0x0e092b 0x10092d 0x110a30 0x120a32 0x140b34
102             0x150b37 0x160b39 0x180c3c 0x190c3e 0x1b0c41 0x1c0c43 0x1e0c45 0x1f0c48
103             0x210c4a 0x230c4c 0x240c4f 0x260c51 0x280b53 0x290b55 0x2b0b57 0x2d0b59
104             0x2f0a5b 0x310a5c 0x320a5e 0x340a5f 0x360961 0x380962 0x390963 0x3b0964
105             0x3d0965 0x3e0966 0x400a67 0x420a68 0x440a68 0x450a69 0x470b6a 0x490b6a
106             0x4a0c6b 0x4c0c6b 0x4d0d6c 0x4f0d6c 0x510e6c 0x520e6d 0x540f6d 0x550f6d
107             0x57106e 0x59106e 0x5a116e 0x5c126e 0x5d126e 0x5f136e 0x61136e 0x62146e
108             0x64156e 0x65156e 0x67166e 0x69166e 0x6a176e 0x6c186e 0x6d186e 0x6f196e
109             0x71196e 0x721a6e 0x741a6e 0x751b6e 0x771c6d 0x781c6d 0x7a1d6d 0x7c1d6d
110             0x7d1e6d 0x7f1e6c 0x801f6c 0x82206c 0x84206b 0x85216b 0x87216b 0x88226a
111             0x8a226a 0x8c2369 0x8d2369 0x8f2469 0x902568 0x922568 0x932667 0x952667
112             0x972766 0x982766 0x9a2865 0x9b2964 0x9d2964 0x9f2a63 0xa02a63 0xa22b62
113             0xa32c61 0xa52c60 0xa62d60 0xa82e5f 0xa92e5e 0xab2f5e 0xad305d 0xae305c
114             0xb0315b 0xb1325a 0xb3325a 0xb43359 0xb63458 0xb73557 0xb93556 0xba3655
115             0xbc3754 0xbd3853 0xbf3952 0xc03a51 0xc13a50 0xc33b4f 0xc43c4e 0xc63d4d
116             0xc73e4c 0xc83f4b 0xca404a 0xcb4149 0xcc4248 0xce4347 0xcf4446 0xd04545
117             0xd24644 0xd34743 0xd44842 0xd54a41 0xd74b3f 0xd84c3e 0xd94d3d 0xda4e3c
118             0xdb503b 0xdd513a 0xde5238 0xdf5337 0xe05536 0xe15635 0xe25734 0xe35933
119             0xe45a31 0xe55c30 0xe65d2f 0xe75e2e 0xe8602d 0xe9612b 0xea632a 0xeb6429
120             0xeb6628 0xec6726 0xed6925 0xee6a24 0xef6c23 0xef6e21 0xf06f20 0xf1711f
121             0xf1731d 0xf2741c 0xf3761b 0xf37819 0xf47918 0xf57b17 0xf57d15 0xf67e14
122             0xf68013 0xf78212 0xf78410 0xf8850f 0xf8870e 0xf8890c 0xf98b0b 0xf98c0a
123             0xf98e09 0xfa9008 0xfa9207 0xfa9407 0xfb9606 0xfb9706 0xfb9906 0xfb9b06
124             0xfb9d07 0xfc9f07 0xfca108 0xfca309 0xfca50a 0xfca60c 0xfca80d 0xfcaa0f
125             0xfcac11 0xfcae12 0xfcb014 0xfcb216 0xfcb418 0xfbb61a 0xfbb81d 0xfbba1f
126             0xfbbc21 0xfbbe23 0xfac026 0xfac228 0xfac42a 0xfac62d 0xf9c72f 0xf9c932
127             0xf9cb35 0xf8cd37 0xf8cf3a 0xf7d13d 0xf7d340 0xf6d543 0xf6d746 0xf5d949
128             0xf5db4c 0xf4dd4f 0xf4df53 0xf4e156 0xf3e35a 0xf3e55d 0xf2e661 0xf2e865
129             0xf2ea69 0xf1ec6d 0xf1ed71 0xf1ef75 0xf1f179 0xf2f27d 0xf2f482 0xf3f586
130             0xf3f68a 0xf4f88e 0xf5f992 0xf6fa96 0xf8fb9a 0xf9fc9d 0xfafda1 0xfcffa4
131         },
132     },
133 };
134 
135 /// &#8203;
136 ///
137 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/magma.png" width="100%" height="40" alt="magma">
138 pub const MAGMA: Gradient = Gradient {
139     eval: &Ramp {
140         name: "Magma",
141         colors: colors! {
142             0x000004 0x010005 0x010106 0x010108 0x020109 0x02020b 0x02020d 0x03030f
143             0x030312 0x040414 0x050416 0x060518 0x06051a 0x07061c 0x08071e 0x090720
144             0x0a0822 0x0b0924 0x0c0926 0x0d0a29 0x0e0b2b 0x100b2d 0x110c2f 0x120d31
145             0x130d34 0x140e36 0x150e38 0x160f3b 0x180f3d 0x19103f 0x1a1042 0x1c1044
146             0x1d1147 0x1e1149 0x20114b 0x21114e 0x221150 0x241253 0x251255 0x271258
147             0x29115a 0x2a115c 0x2c115f 0x2d1161 0x2f1163 0x311165 0x331067 0x341069
148             0x36106b 0x38106c 0x390f6e 0x3b0f70 0x3d0f71 0x3f0f72 0x400f74 0x420f75
149             0x440f76 0x451077 0x471078 0x491078 0x4a1079 0x4c117a 0x4e117b 0x4f127b
150             0x51127c 0x52137c 0x54137d 0x56147d 0x57157e 0x59157e 0x5a167e 0x5c167f
151             0x5d177f 0x5f187f 0x601880 0x621980 0x641a80 0x651a80 0x671b80 0x681c81
152             0x6a1c81 0x6b1d81 0x6d1d81 0x6e1e81 0x701f81 0x721f81 0x732081 0x752181
153             0x762181 0x782281 0x792282 0x7b2382 0x7c2382 0x7e2482 0x802582 0x812581
154             0x832681 0x842681 0x862781 0x882781 0x892881 0x8b2981 0x8c2981 0x8e2a81
155             0x902a81 0x912b81 0x932b80 0x942c80 0x962c80 0x982d80 0x992d80 0x9b2e7f
156             0x9c2e7f 0x9e2f7f 0xa02f7f 0xa1307e 0xa3307e 0xa5317e 0xa6317d 0xa8327d
157             0xaa337d 0xab337c 0xad347c 0xae347b 0xb0357b 0xb2357b 0xb3367a 0xb5367a
158             0xb73779 0xb83779 0xba3878 0xbc3978 0xbd3977 0xbf3a77 0xc03a76 0xc23b75
159             0xc43c75 0xc53c74 0xc73d73 0xc83e73 0xca3e72 0xcc3f71 0xcd4071 0xcf4070
160             0xd0416f 0xd2426f 0xd3436e 0xd5446d 0xd6456c 0xd8456c 0xd9466b 0xdb476a
161             0xdc4869 0xde4968 0xdf4a68 0xe04c67 0xe24d66 0xe34e65 0xe44f64 0xe55064
162             0xe75263 0xe85362 0xe95462 0xea5661 0xeb5760 0xec5860 0xed5a5f 0xee5b5e
163             0xef5d5e 0xf05f5e 0xf1605d 0xf2625d 0xf2645c 0xf3655c 0xf4675c 0xf4695c
164             0xf56b5c 0xf66c5c 0xf66e5c 0xf7705c 0xf7725c 0xf8745c 0xf8765c 0xf9785d
165             0xf9795d 0xf97b5d 0xfa7d5e 0xfa7f5e 0xfa815f 0xfb835f 0xfb8560 0xfb8761
166             0xfc8961 0xfc8a62 0xfc8c63 0xfc8e64 0xfc9065 0xfd9266 0xfd9467 0xfd9668
167             0xfd9869 0xfd9a6a 0xfd9b6b 0xfe9d6c 0xfe9f6d 0xfea16e 0xfea36f 0xfea571
168             0xfea772 0xfea973 0xfeaa74 0xfeac76 0xfeae77 0xfeb078 0xfeb27a 0xfeb47b
169             0xfeb67c 0xfeb77e 0xfeb97f 0xfebb81 0xfebd82 0xfebf84 0xfec185 0xfec287
170             0xfec488 0xfec68a 0xfec88c 0xfeca8d 0xfecc8f 0xfecd90 0xfecf92 0xfed194
171             0xfed395 0xfed597 0xfed799 0xfed89a 0xfdda9c 0xfddc9e 0xfddea0 0xfde0a1
172             0xfde2a3 0xfde3a5 0xfde5a7 0xfde7a9 0xfde9aa 0xfdebac 0xfcecae 0xfceeb0
173             0xfcf0b2 0xfcf2b4 0xfcf4b6 0xfcf6b8 0xfcf7b9 0xfcf9bb 0xfcfbbd 0xfcfdbf
174         },
175     },
176 };
177 
178 /// &#8203;
179 ///
180 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/plasma.png" width="100%" height="40" alt="plasma">
181 pub const PLASMA: Gradient = Gradient {
182     eval: &Ramp {
183         name: "Plasma",
184         colors: colors! {
185             0x0d0887 0x100788 0x130789 0x16078a 0x19068c 0x1b068d 0x1d068e 0x20068f
186             0x220690 0x240691 0x260591 0x280592 0x2a0593 0x2c0594 0x2e0595 0x2f0596
187             0x310597 0x330597 0x350498 0x370499 0x38049a 0x3a049a 0x3c049b 0x3e049c
188             0x3f049c 0x41049d 0x43039e 0x44039e 0x46039f 0x48039f 0x4903a0 0x4b03a1
189             0x4c02a1 0x4e02a2 0x5002a2 0x5102a3 0x5302a3 0x5502a4 0x5601a4 0x5801a4
190             0x5901a5 0x5b01a5 0x5c01a6 0x5e01a6 0x6001a6 0x6100a7 0x6300a7 0x6400a7
191             0x6600a7 0x6700a8 0x6900a8 0x6a00a8 0x6c00a8 0x6e00a8 0x6f00a8 0x7100a8
192             0x7201a8 0x7401a8 0x7501a8 0x7701a8 0x7801a8 0x7a02a8 0x7b02a8 0x7d03a8
193             0x7e03a8 0x8004a8 0x8104a7 0x8305a7 0x8405a7 0x8606a6 0x8707a6 0x8808a6
194             0x8a09a5 0x8b0aa5 0x8d0ba5 0x8e0ca4 0x8f0da4 0x910ea3 0x920fa3 0x9410a2
195             0x9511a1 0x9613a1 0x9814a0 0x99159f 0x9a169f 0x9c179e 0x9d189d 0x9e199d
196             0xa01a9c 0xa11b9b 0xa21d9a 0xa31e9a 0xa51f99 0xa62098 0xa72197 0xa82296
197             0xaa2395 0xab2494 0xac2694 0xad2793 0xae2892 0xb02991 0xb12a90 0xb22b8f
198             0xb32c8e 0xb42e8d 0xb52f8c 0xb6308b 0xb7318a 0xb83289 0xba3388 0xbb3488
199             0xbc3587 0xbd3786 0xbe3885 0xbf3984 0xc03a83 0xc13b82 0xc23c81 0xc33d80
200             0xc43e7f 0xc5407e 0xc6417d 0xc7427c 0xc8437b 0xc9447a 0xca457a 0xcb4679
201             0xcc4778 0xcc4977 0xcd4a76 0xce4b75 0xcf4c74 0xd04d73 0xd14e72 0xd24f71
202             0xd35171 0xd45270 0xd5536f 0xd5546e 0xd6556d 0xd7566c 0xd8576b 0xd9586a
203             0xda5a6a 0xda5b69 0xdb5c68 0xdc5d67 0xdd5e66 0xde5f65 0xde6164 0xdf6263
204             0xe06363 0xe16462 0xe26561 0xe26660 0xe3685f 0xe4695e 0xe56a5d 0xe56b5d
205             0xe66c5c 0xe76e5b 0xe76f5a 0xe87059 0xe97158 0xe97257 0xea7457 0xeb7556
206             0xeb7655 0xec7754 0xed7953 0xed7a52 0xee7b51 0xef7c51 0xef7e50 0xf07f4f
207             0xf0804e 0xf1814d 0xf1834c 0xf2844b 0xf3854b 0xf3874a 0xf48849 0xf48948
208             0xf58b47 0xf58c46 0xf68d45 0xf68f44 0xf79044 0xf79143 0xf79342 0xf89441
209             0xf89540 0xf9973f 0xf9983e 0xf99a3e 0xfa9b3d 0xfa9c3c 0xfa9e3b 0xfb9f3a
210             0xfba139 0xfba238 0xfca338 0xfca537 0xfca636 0xfca835 0xfca934 0xfdab33
211             0xfdac33 0xfdae32 0xfdaf31 0xfdb130 0xfdb22f 0xfdb42f 0xfdb52e 0xfeb72d
212             0xfeb82c 0xfeba2c 0xfebb2b 0xfebd2a 0xfebe2a 0xfec029 0xfdc229 0xfdc328
213             0xfdc527 0xfdc627 0xfdc827 0xfdca26 0xfdcb26 0xfccd25 0xfcce25 0xfcd025
214             0xfcd225 0xfbd324 0xfbd524 0xfbd724 0xfad824 0xfada24 0xf9dc24 0xf9dd25
215             0xf8df25 0xf8e125 0xf7e225 0xf7e425 0xf6e626 0xf6e826 0xf5e926 0xf5eb27
216             0xf4ed27 0xf3ee27 0xf3f027 0xf2f227 0xf1f426 0xf1f525 0xf0f724 0xf0f921
217         },
218     },
219 };
220 
221 /// &#8203;
222 ///
223 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/cividis.png" width="100%" height="40" alt="cividis">
224 pub const CIVIDIS: Gradient = Gradient { eval: &Cividis };
225 
226 struct Cividis;
227 
228 impl EvalGradient for Cividis {
name(&self) -> &'static str229     fn name(&self) -> &'static str {
230         "Cividis"
231     }
232 
eval_continuous(&self, t: f64) -> Color233     fn eval_continuous(&self, t: f64) -> Color {
234         let r = (-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57)))))
235             .max(0.0)
236             .min(255.0) as u8;
237         let g = (32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37)))))
238             .max(0.0)
239             .min(255.0) as u8;
240         let b = (81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))
241             .max(0.0)
242             .min(255.0) as u8;
243         Color { r, g, b }
244     }
245 }
246 
247 struct InterpolateCubehelix {
248     name: &'static str,
249     start: Cubehelix,
250     end: Cubehelix,
251 }
252 
253 impl EvalGradient for InterpolateCubehelix {
name(&self) -> &'static str254     fn name(&self) -> &'static str {
255         self.name
256     }
257 
eval_continuous(&self, t: f64) -> Color258     fn eval_continuous(&self, t: f64) -> Color {
259         cubehelix::interpolate(self.start, self.end, t).into()
260     }
261 }
262 
263 /// &#8203;
264 ///
265 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/warm.png" width="100%" height="40" alt="warm">
266 pub const WARM: Gradient = Gradient {
267     eval: &InterpolateCubehelix {
268         name: "Warm",
269         start: Cubehelix {
270             h: -100.0,
271             s: 0.75,
272             l: 0.35,
273         },
274         end: Cubehelix {
275             h: 80.0,
276             s: 1.5,
277             l: 0.8,
278         },
279     },
280 };
281 
282 /// &#8203;
283 ///
284 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/cool.png" width="100%" height="40" alt="cool">
285 pub const COOL: Gradient = Gradient {
286     eval: &InterpolateCubehelix {
287         name: "Cool",
288         start: Cubehelix {
289             h: 260.0,
290             s: 0.75,
291             l: 0.35,
292         },
293         end: Cubehelix {
294             h: 80.0,
295             s: 1.5,
296             l: 0.8,
297         },
298     },
299 };
300 
301 /// &#8203;
302 ///
303 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/cubehelix.png" width="100%" height="40" alt="cubehelix">
304 pub const CUBEHELIX: Gradient = Gradient {
305     eval: &InterpolateCubehelix {
306         name: "Cubehelix",
307         start: Cubehelix {
308             h: 300.0,
309             s: 0.5,
310             l: 0.0,
311         },
312         end: Cubehelix {
313             h: -240.0,
314             s: 0.5,
315             l: 1.0,
316         },
317     },
318 };
319 
320 /// &#8203;
321 ///
322 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/BuGn.png" width="100%" height="40" alt="BuGn">
323 pub const BLUE_GREEN: Gradient = Gradient {
324     eval: &Sequential {
325         name: "BuGn",
326         three: colors!(0xe5f5f9 0x99d8c9 0x2ca25f),
327         four: colors!(0xedf8fb 0xb2e2e2 0x66c2a4 0x238b45),
328         five: colors!(0xedf8fb 0xb2e2e2 0x66c2a4 0x2ca25f 0x006d2c),
329         six: colors!(0xedf8fb 0xccece6 0x99d8c9 0x66c2a4 0x2ca25f 0x006d2c),
330         seven: colors!(0xedf8fb 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x005824),
331         eight: colors!(0xf7fcfd 0xe5f5f9 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x005824),
332         nine: colors!(0xf7fcfd 0xe5f5f9 0xccece6 0x99d8c9 0x66c2a4 0x41ae76 0x238b45 0x006d2c 0x00441b),
333     },
334 };
335 
336 /// &#8203;
337 ///
338 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/BuPu.png" width="100%" height="40" alt="BuPu">
339 pub const BLUE_PURPLE: Gradient = Gradient {
340     eval: &Sequential {
341         name: "BuPu",
342         three: colors!(0xe0ecf4 0x9ebcda 0x8856a7),
343         four: colors!(0xedf8fb 0xb3cde3 0x8c96c6 0x88419d),
344         five: colors!(0xedf8fb 0xb3cde3 0x8c96c6 0x8856a7 0x810f7c),
345         six: colors!(0xedf8fb 0xbfd3e6 0x9ebcda 0x8c96c6 0x8856a7 0x810f7c),
346         seven: colors!(0xedf8fb 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x6e016b),
347         eight: colors!(0xf7fcfd 0xe0ecf4 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x6e016b),
348         nine: colors!(0xf7fcfd 0xe0ecf4 0xbfd3e6 0x9ebcda 0x8c96c6 0x8c6bb1 0x88419d 0x810f7c 0x4d004b),
349     },
350 };
351 
352 /// &#8203;
353 ///
354 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/GnBu.png" width="100%" height="40" alt="GnBu">
355 pub const GREEN_BLUE: Gradient = Gradient {
356     eval: &Sequential {
357         name: "GnBu",
358         three: colors!(0xe0f3db 0xa8ddb5 0x43a2ca),
359         four: colors!(0xf0f9e8 0xbae4bc 0x7bccc4 0x2b8cbe),
360         five: colors!(0xf0f9e8 0xbae4bc 0x7bccc4 0x43a2ca 0x0868ac),
361         six: colors!(0xf0f9e8 0xccebc5 0xa8ddb5 0x7bccc4 0x43a2ca 0x0868ac),
362         seven: colors!(0xf0f9e8 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x08589e),
363         eight: colors!(0xf7fcf0 0xe0f3db 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x08589e),
364         nine: colors!(0xf7fcf0 0xe0f3db 0xccebc5 0xa8ddb5 0x7bccc4 0x4eb3d3 0x2b8cbe 0x0868ac 0x084081),
365     },
366 };
367 
368 /// &#8203;
369 ///
370 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/OrRd.png" width="100%" height="40" alt="OrRd">
371 pub const ORANGE_RED: Gradient = Gradient {
372     eval: &Sequential {
373         name: "OrRd",
374         three: colors!(0xfee8c8 0xfdbb84 0xe34a33),
375         four: colors!(0xfef0d9 0xfdcc8a 0xfc8d59 0xd7301f),
376         five: colors!(0xfef0d9 0xfdcc8a 0xfc8d59 0xe34a33 0xb30000),
377         six: colors!(0xfef0d9 0xfdd49e 0xfdbb84 0xfc8d59 0xe34a33 0xb30000),
378         seven: colors!(0xfef0d9 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0x990000),
379         eight: colors!(0xfff7ec 0xfee8c8 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0x990000),
380         nine: colors!(0xfff7ec 0xfee8c8 0xfdd49e 0xfdbb84 0xfc8d59 0xef6548 0xd7301f 0xb30000 0x7f0000),
381     },
382 };
383 
384 /// &#8203;
385 ///
386 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/PuBuGn.png" width="100%" height="40" alt="PuBuGn">
387 pub const PURPLE_BLUE_GREEN: Gradient = Gradient {
388     eval: &Sequential {
389         name: "PuBuGn",
390         three: colors!(0xece2f0 0xa6bddb 0x1c9099),
391         four: colors!(0xf6eff7 0xbdc9e1 0x67a9cf 0x02818a),
392         five: colors!(0xf6eff7 0xbdc9e1 0x67a9cf 0x1c9099 0x016c59),
393         six: colors!(0xf6eff7 0xd0d1e6 0xa6bddb 0x67a9cf 0x1c9099 0x016c59),
394         seven: colors!(0xf6eff7 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016450),
395         eight: colors!(0xfff7fb 0xece2f0 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016450),
396         nine: colors!(0xfff7fb 0xece2f0 0xd0d1e6 0xa6bddb 0x67a9cf 0x3690c0 0x02818a 0x016c59 0x014636),
397     },
398 };
399 
400 /// &#8203;
401 ///
402 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/PuBu.png" width="100%" height="40" alt="PuBu">
403 pub const PURPLE_BLUE: Gradient = Gradient {
404     eval: &Sequential {
405         name: "PuBu",
406         three: colors!(0xece7f2 0xa6bddb 0x2b8cbe),
407         four: colors!(0xf1eef6 0xbdc9e1 0x74a9cf 0x0570b0),
408         five: colors!(0xf1eef6 0xbdc9e1 0x74a9cf 0x2b8cbe 0x045a8d),
409         six: colors!(0xf1eef6 0xd0d1e6 0xa6bddb 0x74a9cf 0x2b8cbe 0x045a8d),
410         seven: colors!(0xf1eef6 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x034e7b),
411         eight: colors!(0xfff7fb 0xece7f2 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x034e7b),
412         nine: colors!(0xfff7fb 0xece7f2 0xd0d1e6 0xa6bddb 0x74a9cf 0x3690c0 0x0570b0 0x045a8d 0x023858),
413     },
414 };
415 
416 /// &#8203;
417 ///
418 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/PuRd.png" width="100%" height="40" alt="PuRd">
419 pub const PURPLE_RED: Gradient = Gradient {
420     eval: &Sequential {
421         name: "PuRd",
422         three: colors!(0xe7e1ef 0xc994c7 0xdd1c77),
423         four: colors!(0xf1eef6 0xd7b5d8 0xdf65b0 0xce1256),
424         five: colors!(0xf1eef6 0xd7b5d8 0xdf65b0 0xdd1c77 0x980043),
425         six: colors!(0xf1eef6 0xd4b9da 0xc994c7 0xdf65b0 0xdd1c77 0x980043),
426         seven: colors!(0xf1eef6 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x91003f),
427         eight: colors!(0xf7f4f9 0xe7e1ef 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x91003f),
428         nine: colors!(0xf7f4f9 0xe7e1ef 0xd4b9da 0xc994c7 0xdf65b0 0xe7298a 0xce1256 0x980043 0x67001f),
429     },
430 };
431 
432 /// &#8203;
433 ///
434 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/RdPu.png" width="100%" height="40" alt="RdPu">
435 pub const RED_PURPLE: Gradient = Gradient {
436     eval: &Sequential {
437         name: "RdPu",
438         three: colors!(0xfde0dd 0xfa9fb5 0xc51b8a),
439         four: colors!(0xfeebe2 0xfbb4b9 0xf768a1 0xae017e),
440         five: colors!(0xfeebe2 0xfbb4b9 0xf768a1 0xc51b8a 0x7a0177),
441         six: colors!(0xfeebe2 0xfcc5c0 0xfa9fb5 0xf768a1 0xc51b8a 0x7a0177),
442         seven: colors!(0xfeebe2 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177),
443         eight: colors!(0xfff7f3 0xfde0dd 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177),
444         nine: colors!(0xfff7f3 0xfde0dd 0xfcc5c0 0xfa9fb5 0xf768a1 0xdd3497 0xae017e 0x7a0177 0x49006a),
445     },
446 };
447 
448 /// &#8203;
449 ///
450 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/YlGnBu.png" width="100%" height="40" alt="YlGnBu">
451 pub const YELLOW_GREEN_BLUE: Gradient = Gradient {
452     eval: &Sequential {
453         name: "YlGnBu",
454         three: colors!(0xedf8b1 0x7fcdbb 0x2c7fb8),
455         four: colors!(0xffffcc 0xa1dab4 0x41b6c4 0x225ea8),
456         five: colors!(0xffffcc 0xa1dab4 0x41b6c4 0x2c7fb8 0x253494),
457         six: colors!(0xffffcc 0xc7e9b4 0x7fcdbb 0x41b6c4 0x2c7fb8 0x253494),
458         seven: colors!(0xffffcc 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x0c2c84),
459         eight: colors!(0xffffd9 0xedf8b1 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x0c2c84),
460         nine: colors!(0xffffd9 0xedf8b1 0xc7e9b4 0x7fcdbb 0x41b6c4 0x1d91c0 0x225ea8 0x253494 0x081d58),
461     },
462 };
463 
464 /// &#8203;
465 ///
466 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/YlGn.png" width="100%" height="40" alt="YlGn">
467 pub const YELLOW_GREEN: Gradient = Gradient {
468     eval: &Sequential {
469         name: "YlGn",
470         three: colors!(0xf7fcb9 0xaddd8e 0x31a354),
471         four: colors!(0xffffcc 0xc2e699 0x78c679 0x238443),
472         five: colors!(0xffffcc 0xc2e699 0x78c679 0x31a354 0x006837),
473         six: colors!(0xffffcc 0xd9f0a3 0xaddd8e 0x78c679 0x31a354 0x006837),
474         seven: colors!(0xffffcc 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x005a32),
475         eight: colors!(0xffffe5 0xf7fcb9 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x005a32),
476         nine: colors!(0xffffe5 0xf7fcb9 0xd9f0a3 0xaddd8e 0x78c679 0x41ab5d 0x238443 0x006837 0x004529),
477     },
478 };
479 
480 /// &#8203;
481 ///
482 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/YlOrBr.png" width="100%" height="40" alt="YlOrBr">
483 pub const YELLOW_ORANGE_BROWN: Gradient = Gradient {
484     eval: &Sequential {
485         name: "YlOrBr",
486         three: colors!(0xfff7bc 0xfec44f 0xd95f0e),
487         four: colors!(0xffffd4 0xfed98e 0xfe9929 0xcc4c02),
488         five: colors!(0xffffd4 0xfed98e 0xfe9929 0xd95f0e 0x993404),
489         six: colors!(0xffffd4 0xfee391 0xfec44f 0xfe9929 0xd95f0e 0x993404),
490         seven: colors!(0xffffd4 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x8c2d04),
491         eight: colors!(0xffffe5 0xfff7bc 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x8c2d04),
492         nine: colors!(0xffffe5 0xfff7bc 0xfee391 0xfec44f 0xfe9929 0xec7014 0xcc4c02 0x993404 0x662506),
493     },
494 };
495 
496 /// &#8203;
497 ///
498 /// <img src="https://raw.githubusercontent.com/dtolnay/colorous/readme/YlOrRd.png" width="100%" height="40" alt="YlOrRd">
499 pub const YELLOW_ORANGE_RED: Gradient = Gradient {
500     eval: &Sequential {
501         name: "YlOrRd",
502         three: colors!(0xffeda0 0xfeb24c 0xf03b20),
503         four: colors!(0xffffb2 0xfecc5c 0xfd8d3c 0xe31a1c),
504         five: colors!(0xffffb2 0xfecc5c 0xfd8d3c 0xf03b20 0xbd0026),
505         six: colors!(0xffffb2 0xfed976 0xfeb24c 0xfd8d3c 0xf03b20 0xbd0026),
506         seven: colors!(0xffffb2 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xb10026),
507         eight: colors!(0xffffcc 0xffeda0 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xb10026),
508         nine: colors!(0xffffcc 0xffeda0 0xfed976 0xfeb24c 0xfd8d3c 0xfc4e2a 0xe31a1c 0xbd0026 0x800026),
509     },
510 };
511