@akiojin/gwt 9.0.4 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.ja.md +106 -146
  2. package/README.md +103 -143
  3. package/bin/gwt.cjs +1 -1
  4. package/package.json +5 -5
  5. package/rustfmt.toml +0 -2
  6. package/scripts/check-release-flow.sh +2 -8
  7. package/scripts/postinstall.js +17 -7
  8. package/scripts/run-local-backend-tests-on-commit.sh +6 -12
  9. package/scripts/test-all.sh +1 -5
  10. package/scripts/check-e2e-coverage-threshold.mjs +0 -238
  11. package/scripts/run-local-e2e-coverage-on-commit.sh +0 -69
  12. package/scripts/run-local-e2e-on-commit.sh +0 -60
  13. package/scripts/verify-ci-node-toolchain.sh +0 -76
  14. package/scripts/voice-eval.sh +0 -48
  15. package/vendor/ratatui-core/src/backend/test.rs +0 -1077
  16. package/vendor/ratatui-core/src/backend.rs +0 -405
  17. package/vendor/ratatui-core/src/buffer/assert.rs +0 -71
  18. package/vendor/ratatui-core/src/buffer/buffer.rs +0 -1388
  19. package/vendor/ratatui-core/src/buffer/cell.rs +0 -377
  20. package/vendor/ratatui-core/src/buffer.rs +0 -9
  21. package/vendor/ratatui-core/src/layout/alignment.rs +0 -89
  22. package/vendor/ratatui-core/src/layout/constraint.rs +0 -526
  23. package/vendor/ratatui-core/src/layout/direction.rs +0 -63
  24. package/vendor/ratatui-core/src/layout/flex.rs +0 -212
  25. package/vendor/ratatui-core/src/layout/layout.rs +0 -2838
  26. package/vendor/ratatui-core/src/layout/margin.rs +0 -79
  27. package/vendor/ratatui-core/src/layout/offset.rs +0 -66
  28. package/vendor/ratatui-core/src/layout/position.rs +0 -253
  29. package/vendor/ratatui-core/src/layout/rect/iter.rs +0 -356
  30. package/vendor/ratatui-core/src/layout/rect/ops.rs +0 -136
  31. package/vendor/ratatui-core/src/layout/rect.rs +0 -1114
  32. package/vendor/ratatui-core/src/layout/size.rs +0 -147
  33. package/vendor/ratatui-core/src/layout.rs +0 -333
  34. package/vendor/ratatui-core/src/lib.rs +0 -82
  35. package/vendor/ratatui-core/src/style/anstyle.rs +0 -348
  36. package/vendor/ratatui-core/src/style/color.rs +0 -788
  37. package/vendor/ratatui-core/src/style/palette/material.rs +0 -608
  38. package/vendor/ratatui-core/src/style/palette/tailwind.rs +0 -653
  39. package/vendor/ratatui-core/src/style/palette.rs +0 -6
  40. package/vendor/ratatui-core/src/style/palette_conversion.rs +0 -82
  41. package/vendor/ratatui-core/src/style/stylize.rs +0 -668
  42. package/vendor/ratatui-core/src/style.rs +0 -1069
  43. package/vendor/ratatui-core/src/symbols/bar.rs +0 -51
  44. package/vendor/ratatui-core/src/symbols/block.rs +0 -51
  45. package/vendor/ratatui-core/src/symbols/border.rs +0 -709
  46. package/vendor/ratatui-core/src/symbols/braille.rs +0 -21
  47. package/vendor/ratatui-core/src/symbols/half_block.rs +0 -3
  48. package/vendor/ratatui-core/src/symbols/line.rs +0 -259
  49. package/vendor/ratatui-core/src/symbols/marker.rs +0 -82
  50. package/vendor/ratatui-core/src/symbols/merge.rs +0 -748
  51. package/vendor/ratatui-core/src/symbols/pixel.rs +0 -30
  52. package/vendor/ratatui-core/src/symbols/scrollbar.rs +0 -46
  53. package/vendor/ratatui-core/src/symbols/shade.rs +0 -5
  54. package/vendor/ratatui-core/src/symbols.rs +0 -15
  55. package/vendor/ratatui-core/src/terminal/frame.rs +0 -192
  56. package/vendor/ratatui-core/src/terminal/terminal.rs +0 -926
  57. package/vendor/ratatui-core/src/terminal/viewport.rs +0 -58
  58. package/vendor/ratatui-core/src/terminal.rs +0 -40
  59. package/vendor/ratatui-core/src/text/grapheme.rs +0 -84
  60. package/vendor/ratatui-core/src/text/line.rs +0 -1678
  61. package/vendor/ratatui-core/src/text/masked.rs +0 -149
  62. package/vendor/ratatui-core/src/text/span.rs +0 -904
  63. package/vendor/ratatui-core/src/text/text.rs +0 -1434
  64. package/vendor/ratatui-core/src/text.rs +0 -64
  65. package/vendor/ratatui-core/src/widgets/stateful_widget.rs +0 -193
  66. package/vendor/ratatui-core/src/widgets/widget.rs +0 -174
  67. package/vendor/ratatui-core/src/widgets.rs +0 -9
@@ -1,608 +0,0 @@
1
- //! Material design color palettes.
2
- //!
3
- //! Represents the colors from the 2014 [Material design color palettes][palettes] by Google.
4
- //!
5
- //! [palettes]: https://m2.material.io/design/color/the-color-system.html#tools-for-picking-colors
6
- //!
7
- //! There are 16 palettes with accent colors, and 3 palettes without accent colors. Each palette
8
- //! has 10 colors, with variants from 50 to 900. The accent palettes also have 4 accent colors
9
- //! with variants from 100 to 700. Black and White are also included for completeness and to avoid
10
- //! being affected by any terminal theme that might be in use.
11
- //!
12
- //! This module exists to provide a convenient way to use the colors from the
13
- //! [`matdesign-color` crate] in your application.
14
- //!
15
- //! <style>
16
- //! .color { display: flex; align-items: center; }
17
- //! .color > div { width: 2rem; height: 2rem; }
18
- //! .color > div.name { width: 150px; !important; }
19
- //! </style>
20
- //! <div style="overflow-x: auto">
21
- //! <div style="display: flex; flex-direction:column; text-align: left">
22
- //! <div class="color" style="font-size:0.8em">
23
- //! <div class="name"></div>
24
- //! <div>C50</div>
25
- //! <div>C100</div>
26
- //! <div>C200</div>
27
- //! <div>C300</div>
28
- //! <div>C400</div>
29
- //! <div>C500</div>
30
- //! <div>C600</div>
31
- //! <div>C700</div>
32
- //! <div>C800</div>
33
- //! <div>C900</div>
34
- //! <div>A100</div>
35
- //! <div>A200</div>
36
- //! <div>A400</div>
37
- //! <div>A700</div>
38
- //! </div>
39
- //! <div class="color">
40
- //! <div class="name">
41
- //!
42
- //! [`RED`]</div>
43
- //! <div style="background-color: #FFEBEE"></div>
44
- //! <div style="background-color: #FFCDD2"></div>
45
- //! <div style="background-color: #EF9A9A"></div>
46
- //! <div style="background-color: #E57373"></div>
47
- //! <div style="background-color: #EF5350"></div>
48
- //! <div style="background-color: #F44336"></div>
49
- //! <div style="background-color: #E53935"></div>
50
- //! <div style="background-color: #D32F2F"></div>
51
- //! <div style="background-color: #C62828"></div>
52
- //! <div style="background-color: #B71C1C"></div>
53
- //! <div style="background-color: #FF8A80"></div>
54
- //! <div style="background-color: #FF5252"></div>
55
- //! <div style="background-color: #FF1744"></div>
56
- //! <div style="background-color: #D50000"></div>
57
- //! </div>
58
- //! <div class="color">
59
- //! <div class="name">
60
- //!
61
- //! [`PINK`]</div>
62
- //! <div style="background-color: #FCE4EC"></div>
63
- //! <div style="background-color: #F8BBD0"></div>
64
- //! <div style="background-color: #F48FB1"></div>
65
- //! <div style="background-color: #F06292"></div>
66
- //! <div style="background-color: #EC407A"></div>
67
- //! <div style="background-color: #E91E63"></div>
68
- //! <div style="background-color: #D81B60"></div>
69
- //! <div style="background-color: #C2185B"></div>
70
- //! <div style="background-color: #AD1457"></div>
71
- //! <div style="background-color: #880E4F"></div>
72
- //! <div style="background-color: #FF80AB"></div>
73
- //! <div style="background-color: #FF4081"></div>
74
- //! <div style="background-color: #F50057"></div>
75
- //! <div style="background-color: #C51162"></div>
76
- //! </div>
77
- //! <div class="color">
78
- //! <div class="name">
79
- //!
80
- //! [`PURPLE`]</div>
81
- //! <div style="background-color: #F3E5F5"></div>
82
- //! <div style="background-color: #E1BEE7"></div>
83
- //! <div style="background-color: #CE93D8"></div>
84
- //! <div style="background-color: #BA68C8"></div>
85
- //! <div style="background-color: #AB47BC"></div>
86
- //! <div style="background-color: #9C27B0"></div>
87
- //! <div style="background-color: #8E24AA"></div>
88
- //! <div style="background-color: #7B1FA2"></div>
89
- //! <div style="background-color: #6A1B9A"></div>
90
- //! <div style="background-color: #4A148C"></div>
91
- //! <div style="background-color: #EA80FC"></div>
92
- //! <div style="background-color: #E040FB"></div>
93
- //! <div style="background-color: #D500F9"></div>
94
- //! <div style="background-color: #AA00FF"></div>
95
- //! </div>
96
- //! <div class="color">
97
- //! <div class="name">
98
- //!
99
- //! [`DEEP_PURPLE`]</div>
100
- //! <div style="background-color: #EDE7F6"></div>
101
- //! <div style="background-color: #D1C4E9"></div>
102
- //! <div style="background-color: #B39DDB"></div>
103
- //! <div style="background-color: #9575CD"></div>
104
- //! <div style="background-color: #7E57C2"></div>
105
- //! <div style="background-color: #673AB7"></div>
106
- //! <div style="background-color: #5E35B1"></div>
107
- //! <div style="background-color: #512DA8"></div>
108
- //! <div style="background-color: #4527A0"></div>
109
- //! <div style="background-color: #311B92"></div>
110
- //! <div style="background-color: #B388FF"></div>
111
- //! <div style="background-color: #7C4DFF"></div>
112
- //! <div style="background-color: #651FFF"></div>
113
- //! <div style="background-color: #6200EA"></div>
114
- //! </div>
115
- //! <div class="color">
116
- //! <div class="name">
117
- //!
118
- //! [`INDIGO`]</div>
119
- //! <div style="background-color: #E8EAF6"></div>
120
- //! <div style="background-color: #C5CAE9"></div>
121
- //! <div style="background-color: #9FA8DA"></div>
122
- //! <div style="background-color: #7986CB"></div>
123
- //! <div style="background-color: #5C6BC0"></div>
124
- //! <div style="background-color: #3F51B5"></div>
125
- //! <div style="background-color: #3949AB"></div>
126
- //! <div style="background-color: #303F9F"></div>
127
- //! <div style="background-color: #283593"></div>
128
- //! <div style="background-color: #1A237E"></div>
129
- //! <div style="background-color: #8C9EFF"></div>
130
- //! <div style="background-color: #536DFE"></div>
131
- //! <div style="background-color: #3D5AFE"></div>
132
- //! <div style="background-color: #304FFE"></div>
133
- //! </div>
134
- //! <div class="color">
135
- //! <div class="name">
136
- //!
137
- //! [`BLUE`]</div>
138
- //! <div style="background-color: #E3F2FD"></div>
139
- //! <div style="background-color: #BBDEFB"></div>
140
- //! <div style="background-color: #90CAF9"></div>
141
- //! <div style="background-color: #64B5F6"></div>
142
- //! <div style="background-color: #42A5F5"></div>
143
- //! <div style="background-color: #2196F3"></div>
144
- //! <div style="background-color: #1E88E5"></div>
145
- //! <div style="background-color: #1976D2"></div>
146
- //! <div style="background-color: #1565C0"></div>
147
- //! <div style="background-color: #0D47A1"></div>
148
- //! <div style="background-color: #82B1FF"></div>
149
- //! <div style="background-color: #448AFF"></div>
150
- //! <div style="background-color: #2979FF"></div>
151
- //! <div style="background-color: #2962FF"></div>
152
- //! </div>
153
- //! <div class="color">
154
- //! <div class="name">
155
- //!
156
- //! [`LIGHT_BLUE`]</div>
157
- //! <div style="background-color: #E1F5FE"></div>
158
- //! <div style="background-color: #B3E5FC"></div>
159
- //! <div style="background-color: #81D4FA"></div>
160
- //! <div style="background-color: #4FC3F7"></div>
161
- //! <div style="background-color: #29B6F6"></div>
162
- //! <div style="background-color: #03A9F4"></div>
163
- //! <div style="background-color: #039BE5"></div>
164
- //! <div style="background-color: #0288D1"></div>
165
- //! <div style="background-color: #0277BD"></div>
166
- //! <div style="background-color: #01579B"></div>
167
- //! <div style="background-color: #80D8FF"></div>
168
- //! <div style="background-color: #40C4FF"></div>
169
- //! <div style="background-color: #00B0FF"></div>
170
- //! <div style="background-color: #0091EA"></div>
171
- //! </div>
172
- //! <div class="color">
173
- //! <div class="name">
174
- //!
175
- //! [`CYAN`]</div>
176
- //! <div style="background-color: #E0F7FA"></div>
177
- //! <div style="background-color: #B2EBF2"></div>
178
- //! <div style="background-color: #80DEEA"></div>
179
- //! <div style="background-color: #4DD0E1"></div>
180
- //! <div style="background-color: #26C6DA"></div>
181
- //! <div style="background-color: #00BCD4"></div>
182
- //! <div style="background-color: #00ACC1"></div>
183
- //! <div style="background-color: #0097A7"></div>
184
- //! <div style="background-color: #00838F"></div>
185
- //! <div style="background-color: #006064"></div>
186
- //! <div style="background-color: #84FFFF"></div>
187
- //! <div style="background-color: #18FFFF"></div>
188
- //! <div style="background-color: #00E5FF"></div>
189
- //! <div style="background-color: #00B8D4"></div>
190
- //! </div>
191
- //! <div class="color">
192
- //! <div class="name">
193
- //!
194
- //! [`TEAL`]</div>
195
- //! <div style="background-color: #E0F2F1"></div>
196
- //! <div style="background-color: #B2DFDB"></div>
197
- //! <div style="background-color: #80CBC4"></div>
198
- //! <div style="background-color: #4DB6AC"></div>
199
- //! <div style="background-color: #26A69A"></div>
200
- //! <div style="background-color: #009688"></div>
201
- //! <div style="background-color: #00897B"></div>
202
- //! <div style="background-color: #00796B"></div>
203
- //! <div style="background-color: #00695C"></div>
204
- //! <div style="background-color: #004D40"></div>
205
- //! <div style="background-color: #A7FFEB"></div>
206
- //! <div style="background-color: #64FFDA"></div>
207
- //! <div style="background-color: #1DE9B6"></div>
208
- //! <div style="background-color: #00BFA5"></div>
209
- //! </div>
210
- //! <div class="color">
211
- //! <div class="name">
212
- //!
213
- //! [`GREEN`]</div>
214
- //! <div style="background-color: #E8F5E9"></div>
215
- //! <div style="background-color: #C8E6C9"></div>
216
- //! <div style="background-color: #A5D6A7"></div>
217
- //! <div style="background-color: #81C784"></div>
218
- //! <div style="background-color: #66BB6A"></div>
219
- //! <div style="background-color: #4CAF50"></div>
220
- //! <div style="background-color: #43A047"></div>
221
- //! <div style="background-color: #388E3C"></div>
222
- //! <div style="background-color: #2E7D32"></div>
223
- //! <div style="background-color: #1B5E20"></div>
224
- //! <div style="background-color: #B9F6CA"></div>
225
- //! <div style="background-color: #69F0AE"></div>
226
- //! <div style="background-color: #00E676"></div>
227
- //! <div style="background-color: #00C853"></div>
228
- //! </div>
229
- //! <div class="color">
230
- //! <div class="name">
231
- //!
232
- //! [`LIGHT_GREEN`]</div>
233
- //! <div style="background-color: #F1F8E9"></div>
234
- //! <div style="background-color: #DCEDC8"></div>
235
- //! <div style="background-color: #C5E1A5"></div>
236
- //! <div style="background-color: #AED581"></div>
237
- //! <div style="background-color: #9CCC65"></div>
238
- //! <div style="background-color: #8BC34A"></div>
239
- //! <div style="background-color: #7CB342"></div>
240
- //! <div style="background-color: #689F38"></div>
241
- //! <div style="background-color: #558B2F"></div>
242
- //! <div style="background-color: #33691E"></div>
243
- //! <div style="background-color: #CCFF90"></div>
244
- //! <div style="background-color: #B2FF59"></div>
245
- //! <div style="background-color: #76FF03"></div>
246
- //! <div style="background-color: #64DD17"></div>
247
- //! </div>
248
- //! <div class="color">
249
- //! <div class="name">
250
- //!
251
- //! [`LIME`]</div>
252
- //! <div style="background-color: #F9FBE7"></div>
253
- //! <div style="background-color: #F0F4C3"></div>
254
- //! <div style="background-color: #E6EE9C"></div>
255
- //! <div style="background-color: #DCE775"></div>
256
- //! <div style="background-color: #D4E157"></div>
257
- //! <div style="background-color: #CDDC39"></div>
258
- //! <div style="background-color: #C0CA33"></div>
259
- //! <div style="background-color: #AFB42B"></div>
260
- //! <div style="background-color: #9E9D24"></div>
261
- //! <div style="background-color: #827717"></div>
262
- //! <div style="background-color: #F4FF81"></div>
263
- //! <div style="background-color: #EEFF41"></div>
264
- //! <div style="background-color: #C6FF00"></div>
265
- //! <div style="background-color: #AEEA00"></div>
266
- //! </div>
267
- //! <div class="color">
268
- //! <div class="name">
269
- //!
270
- //! [`YELLOW`]</div>
271
- //! <div style="background-color: #FFFDE7"></div>
272
- //! <div style="background-color: #FFF9C4"></div>
273
- //! <div style="background-color: #FFF59D"></div>
274
- //! <div style="background-color: #FFF176"></div>
275
- //! <div style="background-color: #FFEE58"></div>
276
- //! <div style="background-color: #FFEB3B"></div>
277
- //! <div style="background-color: #FDD835"></div>
278
- //! <div style="background-color: #FBC02D"></div>
279
- //! <div style="background-color: #F9A825"></div>
280
- //! <div style="background-color: #F57F17"></div>
281
- //! <div style="background-color: #FFFF8D"></div>
282
- //! <div style="background-color: #FFFF00"></div>
283
- //! <div style="background-color: #FFEA00"></div>
284
- //! <div style="background-color: #FFD600"></div>
285
- //! </div>
286
- //! <div class="color">
287
- //! <div class="name">
288
- //!
289
- //! [`AMBER`]</div>
290
- //! <div style="background-color: #FFF8E1"></div>
291
- //! <div style="background-color: #FFECB3"></div>
292
- //! <div style="background-color: #FFE082"></div>
293
- //! <div style="background-color: #FFD54F"></div>
294
- //! <div style="background-color: #FFCA28"></div>
295
- //! <div style="background-color: #FFC107"></div>
296
- //! <div style="background-color: #FFB300"></div>
297
- //! <div style="background-color: #FFA000"></div>
298
- //! <div style="background-color: #FF8F00"></div>
299
- //! <div style="background-color: #FF6F00"></div>
300
- //! <div style="background-color: #FFE57F"></div>
301
- //! <div style="background-color: #FFD740"></div>
302
- //! <div style="background-color: #FFC400"></div>
303
- //! <div style="background-color: #FFAB00"></div>
304
- //! </div>
305
- //! <div class="color">
306
- //! <div class="name">
307
- //!
308
- //! [`ORANGE`]</div>
309
- //! <div style="background-color: #FFF3E0"></div>
310
- //! <div style="background-color: #FFE0B2"></div>
311
- //! <div style="background-color: #FFCC80"></div>
312
- //! <div style="background-color: #FFB74D"></div>
313
- //! <div style="background-color: #FFA726"></div>
314
- //! <div style="background-color: #FF9800"></div>
315
- //! <div style="background-color: #FB8C00"></div>
316
- //! <div style="background-color: #F57C00"></div>
317
- //! <div style="background-color: #EF6C00"></div>
318
- //! <div style="background-color: #E65100"></div>
319
- //! <div style="background-color: #FFD180"></div>
320
- //! <div style="background-color: #FFAB40"></div>
321
- //! <div style="background-color: #FF9100"></div>
322
- //! <div style="background-color: #FF6D00"></div>
323
- //! </div>
324
- //! <div class="color">
325
- //! <div class="name">
326
- //!
327
- //! [`DEEP_ORANGE`]</div>
328
- //! <div style="background-color: #FBE9E7"></div>
329
- //! <div style="background-color: #FFCCBC"></div>
330
- //! <div style="background-color: #FFAB91"></div>
331
- //! <div style="background-color: #FF8A65"></div>
332
- //! <div style="background-color: #FF7043"></div>
333
- //! <div style="background-color: #FF5722"></div>
334
- //! <div style="background-color: #F4511E"></div>
335
- //! <div style="background-color: #E64A19"></div>
336
- //! <div style="background-color: #D84315"></div>
337
- //! <div style="background-color: #BF360C"></div>
338
- //! <div style="background-color: #FF9E80"></div>
339
- //! <div style="background-color: #FF6E40"></div>
340
- //! <div style="background-color: #FF3D00"></div>
341
- //! <div style="background-color: #DD2C00"></div>
342
- //! </div>
343
- //! <div class="color">
344
- //! <div class="name">
345
- //!
346
- //! [`BROWN`]</div>
347
- //! <div style="background-color: #EFEBE9"></div>
348
- //! <div style="background-color: #D7CCC8"></div>
349
- //! <div style="background-color: #BCAAA4"></div>
350
- //! <div style="background-color: #A1887F"></div>
351
- //! <div style="background-color: #8D6E63"></div>
352
- //! <div style="background-color: #795548"></div>
353
- //! <div style="background-color: #6D4C41"></div>
354
- //! <div style="background-color: #5D4037"></div>
355
- //! <div style="background-color: #4E342E"></div>
356
- //! <div style="background-color: #3E2723"></div>
357
- //! </div>
358
- //! <div class="color">
359
- //! <div class="name">
360
- //!
361
- //! [`GRAY`]</div>
362
- //! <div style="background-color: #FAFAFA"></div>
363
- //! <div style="background-color: #F5F5F5"></div>
364
- //! <div style="background-color: #EEEEEE"></div>
365
- //! <div style="background-color: #E0E0E0"></div>
366
- //! <div style="background-color: #BDBDBD"></div>
367
- //! <div style="background-color: #9E9E9E"></div>
368
- //! <div style="background-color: #757575"></div>
369
- //! <div style="background-color: #616161"></div>
370
- //! <div style="background-color: #424242"></div>
371
- //! <div style="background-color: #212121"></div>
372
- //! </div>
373
- //! <div class="color">
374
- //! <div class="name">
375
- //!
376
- //! [`BLUE_GRAY`]</div>
377
- //! <div style="background-color: #ECEFF1"></div>
378
- //! <div style="background-color: #CFD8DC"></div>
379
- //! <div style="background-color: #B0BEC5"></div>
380
- //! <div style="background-color: #90A4AE"></div>
381
- //! <div style="background-color: #78909C"></div>
382
- //! <div style="background-color: #607D8B"></div>
383
- //! <div style="background-color: #546E7A"></div>
384
- //! <div style="background-color: #455A64"></div>
385
- //! <div style="background-color: #37474F"></div>
386
- //! <div style="background-color: #263238"></div>
387
- //! </div>
388
- //! <div class="color">
389
- //! <div class="name">
390
- //!
391
- //! [`BLACK`]</div>
392
- //! <div class="bw" style="width: 350px; background-color: #000000"></div>
393
- //! </div>
394
- //! <div class="color">
395
- //! <div class="name">
396
- //!
397
- //! [`WHITE`]</div>
398
- //! <div style="width: 350px; background-color: #FFFFFF"></div>
399
- //! </div>
400
- //! </div>
401
- //! </div>
402
- //!
403
- //! # Example
404
- //!
405
- //! ```rust
406
- //! use ratatui_core::style::Color;
407
- //! use ratatui_core::style::palette::material::{BLUE, RED};
408
- //!
409
- //! assert_eq!(RED.c500, Color::Rgb(244, 67, 54));
410
- //! assert_eq!(BLUE.c500, Color::Rgb(33, 150, 243));
411
- //! ```
412
- //!
413
- //! [`matdesign-color` crate]: https://crates.io/crates/matdesign-color
414
-
415
- use crate::style::Color;
416
-
417
- /// A palette of colors for use in Material design with accent colors
418
- ///
419
- /// This is a collection of colors that are used in Material design. They consist of a set of
420
- /// colors from 50 to 900, and a set of accent colors from 100 to 700.
421
- #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
422
- #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
423
- pub struct AccentedPalette {
424
- pub c50: Color,
425
- pub c100: Color,
426
- pub c200: Color,
427
- pub c300: Color,
428
- pub c400: Color,
429
- pub c500: Color,
430
- pub c600: Color,
431
- pub c700: Color,
432
- pub c800: Color,
433
- pub c900: Color,
434
- pub a100: Color,
435
- pub a200: Color,
436
- pub a400: Color,
437
- pub a700: Color,
438
- }
439
-
440
- /// A palette of colors for use in Material design without accent colors
441
- ///
442
- /// This is a collection of colors that are used in Material design. They consist of a set of
443
- /// colors from 50 to 900.
444
- #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
445
- #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
446
- pub struct NonAccentedPalette {
447
- pub c50: Color,
448
- pub c100: Color,
449
- pub c200: Color,
450
- pub c300: Color,
451
- pub c400: Color,
452
- pub c500: Color,
453
- pub c600: Color,
454
- pub c700: Color,
455
- pub c800: Color,
456
- pub c900: Color,
457
- }
458
-
459
- impl AccentedPalette {
460
- /// Create a new `AccentedPalette` from the given variants
461
- ///
462
- /// The variants should be in the format [0x00RRGGBB, ...]
463
- pub const fn from_variants(variants: [u32; 14]) -> Self {
464
- Self {
465
- c50: Color::from_u32(variants[0]),
466
- c100: Color::from_u32(variants[1]),
467
- c200: Color::from_u32(variants[2]),
468
- c300: Color::from_u32(variants[3]),
469
- c400: Color::from_u32(variants[4]),
470
- c500: Color::from_u32(variants[5]),
471
- c600: Color::from_u32(variants[6]),
472
- c700: Color::from_u32(variants[7]),
473
- c800: Color::from_u32(variants[8]),
474
- c900: Color::from_u32(variants[9]),
475
- a100: Color::from_u32(variants[10]),
476
- a200: Color::from_u32(variants[11]),
477
- a400: Color::from_u32(variants[12]),
478
- a700: Color::from_u32(variants[13]),
479
- }
480
- }
481
- }
482
-
483
- impl NonAccentedPalette {
484
- /// Create a new `NonAccented` from the given variants
485
- ///
486
- /// The variants should be in the format [0x00RRGGBB, ...]
487
- pub const fn from_variants(variants: [u32; 10]) -> Self {
488
- Self {
489
- c50: Color::from_u32(variants[0]),
490
- c100: Color::from_u32(variants[1]),
491
- c200: Color::from_u32(variants[2]),
492
- c300: Color::from_u32(variants[3]),
493
- c400: Color::from_u32(variants[4]),
494
- c500: Color::from_u32(variants[5]),
495
- c600: Color::from_u32(variants[6]),
496
- c700: Color::from_u32(variants[7]),
497
- c800: Color::from_u32(variants[8]),
498
- c900: Color::from_u32(variants[9]),
499
- }
500
- }
501
- }
502
-
503
- // Accented palettes
504
-
505
- pub const RED: AccentedPalette = AccentedPalette::from_variants(variants::RED);
506
- pub const PINK: AccentedPalette = AccentedPalette::from_variants(variants::PINK);
507
- pub const PURPLE: AccentedPalette = AccentedPalette::from_variants(variants::PURPLE);
508
- pub const DEEP_PURPLE: AccentedPalette = AccentedPalette::from_variants(variants::DEEP_PURPLE);
509
- pub const INDIGO: AccentedPalette = AccentedPalette::from_variants(variants::INDIGO);
510
- pub const BLUE: AccentedPalette = AccentedPalette::from_variants(variants::BLUE);
511
- pub const LIGHT_BLUE: AccentedPalette = AccentedPalette::from_variants(variants::LIGHT_BLUE);
512
- pub const CYAN: AccentedPalette = AccentedPalette::from_variants(variants::CYAN);
513
- pub const TEAL: AccentedPalette = AccentedPalette::from_variants(variants::TEAL);
514
- pub const GREEN: AccentedPalette = AccentedPalette::from_variants(variants::GREEN);
515
- pub const LIGHT_GREEN: AccentedPalette = AccentedPalette::from_variants(variants::LIGHT_GREEN);
516
- pub const LIME: AccentedPalette = AccentedPalette::from_variants(variants::LIME);
517
- pub const YELLOW: AccentedPalette = AccentedPalette::from_variants(variants::YELLOW);
518
- pub const AMBER: AccentedPalette = AccentedPalette::from_variants(variants::AMBER);
519
- pub const ORANGE: AccentedPalette = AccentedPalette::from_variants(variants::ORANGE);
520
- pub const DEEP_ORANGE: AccentedPalette = AccentedPalette::from_variants(variants::DEEP_ORANGE);
521
-
522
- // Unaccented palettes
523
- pub const BROWN: NonAccentedPalette = NonAccentedPalette::from_variants(variants::BROWN);
524
- pub const GRAY: NonAccentedPalette = NonAccentedPalette::from_variants(variants::GRAY);
525
- pub const BLUE_GRAY: NonAccentedPalette = NonAccentedPalette::from_variants(variants::BLUE_GRAY);
526
-
527
- // Black and white included for completeness
528
- pub const BLACK: Color = Color::from_u32(0x000000);
529
- pub const WHITE: Color = Color::from_u32(0xFFFFFF);
530
-
531
- mod variants {
532
- pub const RED: [u32; 14] = [
533
- 0xFFEBEE, 0xFFCDD2, 0xEF9A9A, 0xE57373, 0xEF5350, 0xF44336, 0xE53935, 0xD32F2F, 0xC62828,
534
- 0xB71C1C, 0xFF8A80, 0xFF5252, 0xFF1744, 0xD50000,
535
- ];
536
- pub const PINK: [u32; 14] = [
537
- 0xFCE4EC, 0xF8BBD0, 0xF48FB1, 0xF06292, 0xEC407A, 0xE91E63, 0xD81B60, 0xC2185B, 0xAD1457,
538
- 0x880E4F, 0xFF80AB, 0xFF4081, 0xF50057, 0xC51162,
539
- ];
540
- pub const PURPLE: [u32; 14] = [
541
- 0xF3E5F5, 0xE1BEE7, 0xCE93D8, 0xBA68C8, 0xAB47BC, 0x9C27B0, 0x8E24AA, 0x7B1FA2, 0x6A1B9A,
542
- 0x4A148C, 0xEA80FC, 0xE040FB, 0xD500F9, 0xAA00FF,
543
- ];
544
- pub const DEEP_PURPLE: [u32; 14] = [
545
- 0xEDE7F6, 0xD1C4E9, 0xB39DDB, 0x9575CD, 0x7E57C2, 0x673AB7, 0x5E35B1, 0x512DA8, 0x4527A0,
546
- 0x311B92, 0xB388FF, 0x7C4DFF, 0x651FFF, 0x6200EA,
547
- ];
548
- pub const INDIGO: [u32; 14] = [
549
- 0xE8EAF6, 0xC5CAE9, 0x9FA8DA, 0x7986CB, 0x5C6BC0, 0x3F51B5, 0x3949AB, 0x303F9F, 0x283593,
550
- 0x1A237E, 0x8C9EFF, 0x536DFE, 0x3D5AFE, 0x304FFE,
551
- ];
552
- pub const BLUE: [u32; 14] = [
553
- 0xE3F2FD, 0xBBDEFB, 0x90CAF9, 0x64B5F6, 0x42A5F5, 0x2196F3, 0x1E88E5, 0x1976D2, 0x1565C0,
554
- 0x0D47A1, 0x82B1FF, 0x448AFF, 0x2979FF, 0x2962FF,
555
- ];
556
- pub const LIGHT_BLUE: [u32; 14] = [
557
- 0xE1F5FE, 0xB3E5FC, 0x81D4FA, 0x4FC3F7, 0x29B6F6, 0x03A9F4, 0x039BE5, 0x0288D1, 0x0277BD,
558
- 0x01579B, 0x80D8FF, 0x40C4FF, 0x00B0FF, 0x0091EA,
559
- ];
560
- pub const CYAN: [u32; 14] = [
561
- 0xE0F7FA, 0xB2EBF2, 0x80DEEA, 0x4DD0E1, 0x26C6DA, 0x00BCD4, 0x00ACC1, 0x0097A7, 0x00838F,
562
- 0x006064, 0x84FFFF, 0x18FFFF, 0x00E5FF, 0x00B8D4,
563
- ];
564
- pub const TEAL: [u32; 14] = [
565
- 0xE0F2F1, 0xB2DFDB, 0x80CBC4, 0x4DB6AC, 0x26A69A, 0x009688, 0x00897B, 0x00796B, 0x00695C,
566
- 0x004D40, 0xA7FFEB, 0x64FFDA, 0x1DE9B6, 0x00BFA5,
567
- ];
568
- pub const GREEN: [u32; 14] = [
569
- 0xE8F5E9, 0xC8E6C9, 0xA5D6A7, 0x81C784, 0x66BB6A, 0x4CAF50, 0x43A047, 0x388E3C, 0x2E7D32,
570
- 0x1B5E20, 0xB9F6CA, 0x69F0AE, 0x00E676, 0x00C853,
571
- ];
572
- pub const LIGHT_GREEN: [u32; 14] = [
573
- 0xF1F8E9, 0xDCEDC8, 0xC5E1A5, 0xAED581, 0x9CCC65, 0x8BC34A, 0x7CB342, 0x689F38, 0x558B2F,
574
- 0x33691E, 0xCCFF90, 0xB2FF59, 0x76FF03, 0x64DD17,
575
- ];
576
- pub const LIME: [u32; 14] = [
577
- 0xF9FBE7, 0xF0F4C3, 0xE6EE9C, 0xDCE775, 0xD4E157, 0xCDDC39, 0xC0CA33, 0xAFB42B, 0x9E9D24,
578
- 0x827717, 0xF4FF81, 0xEEFF41, 0xC6FF00, 0xAEEA00,
579
- ];
580
- pub const YELLOW: [u32; 14] = [
581
- 0xFFFDE7, 0xFFF9C4, 0xFFF59D, 0xFFF176, 0xFFEE58, 0xFFEB3B, 0xFDD835, 0xFBC02D, 0xF9A825,
582
- 0xF57F17, 0xFFFF8D, 0xFFFF00, 0xFFEA00, 0xFFD600,
583
- ];
584
- pub const AMBER: [u32; 14] = [
585
- 0xFFF8E1, 0xFFECB3, 0xFFE082, 0xFFD54F, 0xFFCA28, 0xFFC107, 0xFFB300, 0xFFA000, 0xFF8F00,
586
- 0xFF6F00, 0xFFE57F, 0xFFD740, 0xFFC400, 0xFFAB00,
587
- ];
588
- pub const ORANGE: [u32; 14] = [
589
- 0xFFF3E0, 0xFFE0B2, 0xFFCC80, 0xFFB74D, 0xFFA726, 0xFF9800, 0xFB8C00, 0xF57C00, 0xEF6C00,
590
- 0xE65100, 0xFFD180, 0xFFAB40, 0xFF9100, 0xFF6D00,
591
- ];
592
- pub const DEEP_ORANGE: [u32; 14] = [
593
- 0xFBE9E7, 0xFFCCBC, 0xFFAB91, 0xFF8A65, 0xFF7043, 0xFF5722, 0xF4511E, 0xE64A19, 0xD84315,
594
- 0xBF360C, 0xFF9E80, 0xFF6E40, 0xFF3D00, 0xDD2C00,
595
- ];
596
- pub const BROWN: [u32; 10] = [
597
- 0xEFEBE9, 0xD7CCC8, 0xBCAAA4, 0xA1887F, 0x8D6E63, 0x795548, 0x6D4C41, 0x5D4037, 0x4E342E,
598
- 0x3E2723,
599
- ];
600
- pub const GRAY: [u32; 10] = [
601
- 0xFAFAFA, 0xF5F5F5, 0xEEEEEE, 0xE0E0E0, 0xBDBDBD, 0x9E9E9E, 0x757575, 0x616161, 0x424242,
602
- 0x212121,
603
- ];
604
- pub const BLUE_GRAY: [u32; 10] = [
605
- 0xECEFF1, 0xCFD8DC, 0xB0BEC5, 0x90A4AE, 0x78909C, 0x607D8B, 0x546E7A, 0x455A64, 0x37474F,
606
- 0x263238,
607
- ];
608
- }