@kidthales/tol-palettes 0.0.0-stage → 0.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 (145) hide show
  1. package/LICENSE +36 -0
  2. package/NOTICE +58 -0
  3. package/README.md +182 -2
  4. package/data/schemes/banded-12.json +49 -0
  5. package/data/schemes/banded-16.json +61 -0
  6. package/data/schemes/banded-20.json +73 -0
  7. package/data/schemes/bright.json +48 -0
  8. package/data/schemes/burd.json +43 -0
  9. package/data/schemes/dark.json +45 -0
  10. package/data/schemes/groundcover.json +54 -0
  11. package/data/schemes/high-contrast.json +32 -0
  12. package/data/schemes/incandescent.json +46 -0
  13. package/data/schemes/iridescent.json +85 -0
  14. package/data/schemes/light.json +56 -0
  15. package/data/schemes/medium-contrast.json +44 -0
  16. package/data/schemes/muted.json +61 -0
  17. package/data/schemes/nightfall.json +78 -0
  18. package/data/schemes/pale.json +33 -0
  19. package/data/schemes/prgn.json +43 -0
  20. package/data/schemes/rainbow-discrete.json +430 -0
  21. package/data/schemes/rainbow-smooth.json +143 -0
  22. package/data/schemes/sunset.json +49 -0
  23. package/data/schemes/vibrant.json +48 -0
  24. package/data/schemes/whorbr.json +44 -0
  25. package/data/schemes/ylorbr.json +43 -0
  26. package/dist/aseprite/banded-12.gpl +21 -0
  27. package/dist/aseprite/banded-16.gpl +25 -0
  28. package/dist/aseprite/banded-20.gpl +29 -0
  29. package/dist/aseprite/bright.gpl +17 -0
  30. package/dist/aseprite/burd.gpl +18 -0
  31. package/dist/aseprite/dark.gpl +20 -0
  32. package/dist/aseprite/groundcover.gpl +23 -0
  33. package/dist/aseprite/high-contrast.gpl +13 -0
  34. package/dist/aseprite/incandescent.gpl +20 -0
  35. package/dist/aseprite/iridescent.gpl +32 -0
  36. package/dist/aseprite/light.gpl +19 -0
  37. package/dist/aseprite/medium-contrast.gpl +16 -0
  38. package/dist/aseprite/muted.gpl +20 -0
  39. package/dist/aseprite/nightfall.gpl +26 -0
  40. package/dist/aseprite/pale.gpl +16 -0
  41. package/dist/aseprite/prgn.gpl +18 -0
  42. package/dist/aseprite/rainbow-discrete.gpl +38 -0
  43. package/dist/aseprite/rainbow-smooth.gpl +43 -0
  44. package/dist/aseprite/sunset.gpl +20 -0
  45. package/dist/aseprite/vibrant.gpl +17 -0
  46. package/dist/aseprite/whorbr.gpl +18 -0
  47. package/dist/aseprite/ylorbr.gpl +18 -0
  48. package/dist/css/banded-12.css +23 -0
  49. package/dist/css/banded-16.css +27 -0
  50. package/dist/css/banded-20.css +31 -0
  51. package/dist/css/bright.css +25 -0
  52. package/dist/css/burd.css +21 -0
  53. package/dist/css/dark.css +21 -0
  54. package/dist/css/groundcover.css +24 -0
  55. package/dist/css/high-contrast.css +17 -0
  56. package/dist/css/incandescent.css +23 -0
  57. package/dist/css/iridescent.css +35 -0
  58. package/dist/css/light.css +29 -0
  59. package/dist/css/medium-contrast.css +23 -0
  60. package/dist/css/muted.css +31 -0
  61. package/dist/css/nightfall.css +38 -0
  62. package/dist/css/pale.css +17 -0
  63. package/dist/css/prgn.css +21 -0
  64. package/dist/css/rainbow-discrete.css +316 -0
  65. package/dist/css/rainbow-smooth.css +46 -0
  66. package/dist/css/sunset.css +23 -0
  67. package/dist/css/tol.css +732 -0
  68. package/dist/css/vibrant.css +25 -0
  69. package/dist/css/whorbr.css +21 -0
  70. package/dist/css/ylorbr.css +21 -0
  71. package/dist/godot/addons/tol_palettes/banded-12.tres +10 -0
  72. package/dist/godot/addons/tol_palettes/banded-16.tres +10 -0
  73. package/dist/godot/addons/tol_palettes/banded-20.tres +10 -0
  74. package/dist/godot/addons/tol_palettes/bright.tres +10 -0
  75. package/dist/godot/addons/tol_palettes/burd.tres +10 -0
  76. package/dist/godot/addons/tol_palettes/dark.tres +10 -0
  77. package/dist/godot/addons/tol_palettes/groundcover.tres +10 -0
  78. package/dist/godot/addons/tol_palettes/high-contrast.tres +10 -0
  79. package/dist/godot/addons/tol_palettes/incandescent.tres +10 -0
  80. package/dist/godot/addons/tol_palettes/iridescent.tres +10 -0
  81. package/dist/godot/addons/tol_palettes/light.tres +10 -0
  82. package/dist/godot/addons/tol_palettes/medium-contrast.tres +10 -0
  83. package/dist/godot/addons/tol_palettes/muted.tres +10 -0
  84. package/dist/godot/addons/tol_palettes/nightfall.tres +10 -0
  85. package/dist/godot/addons/tol_palettes/pale.tres +10 -0
  86. package/dist/godot/addons/tol_palettes/plugin.cfg +12 -0
  87. package/dist/godot/addons/tol_palettes/prgn.tres +10 -0
  88. package/dist/godot/addons/tol_palettes/rainbow-discrete.tres +10 -0
  89. package/dist/godot/addons/tol_palettes/rainbow-smooth.tres +10 -0
  90. package/dist/godot/addons/tol_palettes/sunset.tres +10 -0
  91. package/dist/godot/addons/tol_palettes/tol_palettes.gd +301 -0
  92. package/dist/godot/addons/tol_palettes/vibrant.tres +10 -0
  93. package/dist/godot/addons/tol_palettes/whorbr.tres +10 -0
  94. package/dist/godot/addons/tol_palettes/ylorbr.tres +10 -0
  95. package/dist/godot/banded-12.tres +10 -0
  96. package/dist/godot/banded-16.tres +10 -0
  97. package/dist/godot/banded-20.tres +10 -0
  98. package/dist/godot/bright.tres +10 -0
  99. package/dist/godot/burd.tres +10 -0
  100. package/dist/godot/dark.tres +10 -0
  101. package/dist/godot/groundcover.tres +10 -0
  102. package/dist/godot/high-contrast.tres +10 -0
  103. package/dist/godot/incandescent.tres +10 -0
  104. package/dist/godot/iridescent.tres +10 -0
  105. package/dist/godot/light.tres +10 -0
  106. package/dist/godot/medium-contrast.tres +10 -0
  107. package/dist/godot/muted.tres +10 -0
  108. package/dist/godot/nightfall.tres +10 -0
  109. package/dist/godot/pale.tres +10 -0
  110. package/dist/godot/prgn.tres +10 -0
  111. package/dist/godot/rainbow-discrete.tres +10 -0
  112. package/dist/godot/rainbow-smooth.tres +10 -0
  113. package/dist/godot/sunset.tres +10 -0
  114. package/dist/godot/tol_palettes.gd +301 -0
  115. package/dist/godot/vibrant.tres +10 -0
  116. package/dist/godot/whorbr.tres +10 -0
  117. package/dist/godot/ylorbr.tres +10 -0
  118. package/dist/gpl/banded-12.gpl +20 -0
  119. package/dist/gpl/banded-16.gpl +24 -0
  120. package/dist/gpl/banded-20.gpl +28 -0
  121. package/dist/gpl/bright.gpl +16 -0
  122. package/dist/gpl/burd.gpl +17 -0
  123. package/dist/gpl/dark.gpl +19 -0
  124. package/dist/gpl/groundcover.gpl +22 -0
  125. package/dist/gpl/high-contrast.gpl +12 -0
  126. package/dist/gpl/incandescent.gpl +19 -0
  127. package/dist/gpl/iridescent.gpl +31 -0
  128. package/dist/gpl/light.gpl +18 -0
  129. package/dist/gpl/medium-contrast.gpl +15 -0
  130. package/dist/gpl/muted.gpl +19 -0
  131. package/dist/gpl/nightfall.gpl +25 -0
  132. package/dist/gpl/pale.gpl +15 -0
  133. package/dist/gpl/prgn.gpl +17 -0
  134. package/dist/gpl/rainbow-discrete.gpl +37 -0
  135. package/dist/gpl/rainbow-smooth.gpl +42 -0
  136. package/dist/gpl/sunset.gpl +19 -0
  137. package/dist/gpl/vibrant.gpl +16 -0
  138. package/dist/gpl/whorbr.gpl +17 -0
  139. package/dist/gpl/ylorbr.gpl +17 -0
  140. package/dist/js/index.d.ts +92 -0
  141. package/dist/js/index.js +1845 -0
  142. package/dist/json/schemes.json +1613 -0
  143. package/dist/py/tol_palettes.py +1092 -0
  144. package/package.json +82 -4
  145. package/schema/scheme.schema.json +90 -0
@@ -0,0 +1,1845 @@
1
+ /*
2
+ * Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
3
+ * with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
4
+ * Independent project: not affiliated with or endorsed by Paul Tol.
5
+ * Generated by tools/generate-js.mjs from data/schemes/*.json. Do not edit by hand.
6
+ */
7
+
8
+ export const banded12 = {
9
+ "id": "banded-12",
10
+ "kind": "sequential",
11
+ "colors": [
12
+ {
13
+ "hex": "#D2D1E2"
14
+ },
15
+ {
16
+ "hex": "#C1A7C4"
17
+ },
18
+ {
19
+ "hex": "#AD7BA4"
20
+ },
21
+ {
22
+ "hex": "#93C7EC"
23
+ },
24
+ {
25
+ "hex": "#6DA1D6"
26
+ },
27
+ {
28
+ "hex": "#3E79BD"
29
+ },
30
+ {
31
+ "hex": "#B8D29E"
32
+ },
33
+ {
34
+ "hex": "#7BB47D"
35
+ },
36
+ {
37
+ "hex": "#2C925B"
38
+ },
39
+ {
40
+ "hex": "#F4A937"
41
+ },
42
+ {
43
+ "hex": "#EB7121"
44
+ },
45
+ {
46
+ "hex": "#D9070D"
47
+ }
48
+ ],
49
+ "bad": "#FFFFFF",
50
+ "interpolation": "none",
51
+ "source": {
52
+ "retrieved": "2026-10-18",
53
+ "siteFigure": "fig:scheme_banded",
54
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_banded"
55
+ }
56
+ };
57
+
58
+ export const banded16 = {
59
+ "id": "banded-16",
60
+ "kind": "sequential",
61
+ "colors": [
62
+ {
63
+ "hex": "#D2D1E2"
64
+ },
65
+ {
66
+ "hex": "#C5B3CC"
67
+ },
68
+ {
69
+ "hex": "#B893B5"
70
+ },
71
+ {
72
+ "hex": "#A8719D"
73
+ },
74
+ {
75
+ "hex": "#97CDEF"
76
+ },
77
+ {
78
+ "hex": "#7DB1DF"
79
+ },
80
+ {
81
+ "hex": "#5F94CE"
82
+ },
83
+ {
84
+ "hex": "#3976BB"
85
+ },
86
+ {
87
+ "hex": "#BCD4A0"
88
+ },
89
+ {
90
+ "hex": "#90BE88"
91
+ },
92
+ {
93
+ "hex": "#60A770"
94
+ },
95
+ {
96
+ "hex": "#198D56"
97
+ },
98
+ {
99
+ "hex": "#F5B43B"
100
+ },
101
+ {
102
+ "hex": "#F08C2B"
103
+ },
104
+ {
105
+ "hex": "#E85E1B"
106
+ },
107
+ {
108
+ "hex": "#D9070D"
109
+ }
110
+ ],
111
+ "bad": "#FFFFFF",
112
+ "interpolation": "none",
113
+ "source": {
114
+ "retrieved": "2026-10-18",
115
+ "siteFigure": "fig:scheme_banded",
116
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_banded"
117
+ }
118
+ };
119
+
120
+ export const banded20 = {
121
+ "id": "banded-20",
122
+ "kind": "sequential",
123
+ "colors": [
124
+ {
125
+ "hex": "#D2D1E2"
126
+ },
127
+ {
128
+ "hex": "#C8B9D1"
129
+ },
130
+ {
131
+ "hex": "#BEA0BF"
132
+ },
133
+ {
134
+ "hex": "#B287AD"
135
+ },
136
+ {
137
+ "hex": "#A56B99"
138
+ },
139
+ {
140
+ "hex": "#9ACFF1"
141
+ },
142
+ {
143
+ "hex": "#85BAE4"
144
+ },
145
+ {
146
+ "hex": "#6FA3D7"
147
+ },
148
+ {
149
+ "hex": "#578DC9"
150
+ },
151
+ {
152
+ "hex": "#3774BA"
153
+ },
154
+ {
155
+ "hex": "#BFD6A1"
156
+ },
157
+ {
158
+ "hex": "#9CC48E"
159
+ },
160
+ {
161
+ "hex": "#78B27B"
162
+ },
163
+ {
164
+ "hex": "#4F9F68"
165
+ },
166
+ {
167
+ "hex": "#058A53"
168
+ },
169
+ {
170
+ "hex": "#F6B93D"
171
+ },
172
+ {
173
+ "hex": "#F29B31"
174
+ },
175
+ {
176
+ "hex": "#ED7A24"
177
+ },
178
+ {
179
+ "hex": "#E65318"
180
+ },
181
+ {
182
+ "hex": "#D9070D"
183
+ }
184
+ ],
185
+ "bad": "#FFFFFF",
186
+ "interpolation": "none",
187
+ "source": {
188
+ "retrieved": "2026-10-18",
189
+ "siteFigure": "fig:scheme_banded",
190
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_banded"
191
+ }
192
+ };
193
+
194
+ export const bright = {
195
+ "id": "bright",
196
+ "kind": "qualitative",
197
+ "colors": [
198
+ {
199
+ "hex": "#4477AA",
200
+ "name": "blue"
201
+ },
202
+ {
203
+ "hex": "#EE6677",
204
+ "name": "red"
205
+ },
206
+ {
207
+ "hex": "#228833",
208
+ "name": "green"
209
+ },
210
+ {
211
+ "hex": "#CCBB44",
212
+ "name": "yellow"
213
+ },
214
+ {
215
+ "hex": "#66CCEE",
216
+ "name": "cyan"
217
+ },
218
+ {
219
+ "hex": "#AA3377",
220
+ "name": "purple"
221
+ },
222
+ {
223
+ "hex": "#BBBBBB",
224
+ "name": "grey"
225
+ }
226
+ ],
227
+ "extras": [
228
+ {
229
+ "hex": "#000000",
230
+ "name": "black"
231
+ }
232
+ ],
233
+ "interpolation": "none",
234
+ "source": {
235
+ "retrieved": "2026-10-18",
236
+ "siteFigure": "fig:scheme_bright",
237
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_bright",
238
+ "module": "tol_cset('bright')",
239
+ "moduleVersion": "2022.10"
240
+ }
241
+ };
242
+
243
+ export const burd = {
244
+ "id": "burd",
245
+ "kind": "diverging",
246
+ "colors": [
247
+ {
248
+ "hex": "#2166AC"
249
+ },
250
+ {
251
+ "hex": "#4393C3"
252
+ },
253
+ {
254
+ "hex": "#92C5DE"
255
+ },
256
+ {
257
+ "hex": "#D1E5F0"
258
+ },
259
+ {
260
+ "hex": "#F7F7F7"
261
+ },
262
+ {
263
+ "hex": "#FDDBC7"
264
+ },
265
+ {
266
+ "hex": "#F4A582"
267
+ },
268
+ {
269
+ "hex": "#D6604D"
270
+ },
271
+ {
272
+ "hex": "#B2182B"
273
+ }
274
+ ],
275
+ "bad": "#FFEE99",
276
+ "interpolation": "either",
277
+ "source": {
278
+ "retrieved": "2026-10-18",
279
+ "siteFigure": "fig:scheme_burd",
280
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_burd",
281
+ "module": "tol_cmap('BuRd')",
282
+ "moduleName": "BuRd",
283
+ "moduleVersion": "2022.10"
284
+ }
285
+ };
286
+
287
+ export const dark = {
288
+ "id": "dark",
289
+ "kind": "qualitative",
290
+ "colors": [
291
+ {
292
+ "hex": "#4477BB"
293
+ },
294
+ {
295
+ "hex": "#CC4466"
296
+ },
297
+ {
298
+ "hex": "#228833"
299
+ },
300
+ {
301
+ "hex": "#2255AA"
302
+ },
303
+ {
304
+ "hex": "#993366"
305
+ },
306
+ {
307
+ "hex": "#006644"
308
+ },
309
+ {
310
+ "hex": "#117788"
311
+ },
312
+ {
313
+ "hex": "#882288"
314
+ },
315
+ {
316
+ "hex": "#BB4488"
317
+ },
318
+ {
319
+ "hex": "#775500"
320
+ },
321
+ {
322
+ "hex": "#444444"
323
+ }
324
+ ],
325
+ "interpolation": "none",
326
+ "source": {
327
+ "retrieved": "2026-10-18",
328
+ "siteFigure": "fig:scheme_dark",
329
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_dark"
330
+ }
331
+ };
332
+
333
+ export const groundcover = {
334
+ "id": "groundcover",
335
+ "kind": "special",
336
+ "colors": [
337
+ {
338
+ "hex": "#5566AA"
339
+ },
340
+ {
341
+ "hex": "#117733"
342
+ },
343
+ {
344
+ "hex": "#44AA66"
345
+ },
346
+ {
347
+ "hex": "#55AA22"
348
+ },
349
+ {
350
+ "hex": "#668822"
351
+ },
352
+ {
353
+ "hex": "#99BB55"
354
+ },
355
+ {
356
+ "hex": "#558877"
357
+ },
358
+ {
359
+ "hex": "#88BBAA"
360
+ },
361
+ {
362
+ "hex": "#AADDCC"
363
+ },
364
+ {
365
+ "hex": "#44AA88"
366
+ },
367
+ {
368
+ "hex": "#DDCC66"
369
+ },
370
+ {
371
+ "hex": "#FFDD44"
372
+ },
373
+ {
374
+ "hex": "#FFEE88"
375
+ },
376
+ {
377
+ "hex": "#BB0011"
378
+ }
379
+ ],
380
+ "interpolation": "none",
381
+ "source": {
382
+ "retrieved": "2026-10-18",
383
+ "siteFigure": "fig:scheme_groundcover",
384
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_groundcover"
385
+ }
386
+ };
387
+
388
+ export const highContrast = {
389
+ "id": "high-contrast",
390
+ "kind": "qualitative",
391
+ "colors": [
392
+ {
393
+ "hex": "#004488",
394
+ "name": "blue"
395
+ },
396
+ {
397
+ "hex": "#DDAA33",
398
+ "name": "yellow"
399
+ },
400
+ {
401
+ "hex": "#BB5566",
402
+ "name": "red"
403
+ }
404
+ ],
405
+ "extras": [
406
+ {
407
+ "hex": "#000000",
408
+ "name": "black"
409
+ }
410
+ ],
411
+ "interpolation": "none",
412
+ "source": {
413
+ "retrieved": "2026-10-18",
414
+ "siteFigure": "fig:scheme_highcontrast",
415
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_highcontrast",
416
+ "module": "tol_cset('high-contrast')",
417
+ "moduleVersion": "2022.10"
418
+ }
419
+ };
420
+
421
+ export const incandescent = {
422
+ "id": "incandescent",
423
+ "kind": "sequential",
424
+ "colors": [
425
+ {
426
+ "hex": "#CEFFFF"
427
+ },
428
+ {
429
+ "hex": "#C6F7D6"
430
+ },
431
+ {
432
+ "hex": "#A2F49B"
433
+ },
434
+ {
435
+ "hex": "#BBE453"
436
+ },
437
+ {
438
+ "hex": "#D5CE04"
439
+ },
440
+ {
441
+ "hex": "#E7B503"
442
+ },
443
+ {
444
+ "hex": "#F19903"
445
+ },
446
+ {
447
+ "hex": "#F6790B"
448
+ },
449
+ {
450
+ "hex": "#F94902"
451
+ },
452
+ {
453
+ "hex": "#E40515"
454
+ },
455
+ {
456
+ "hex": "#A80003"
457
+ }
458
+ ],
459
+ "bad": "#888888",
460
+ "interpolation": "linear",
461
+ "source": {
462
+ "retrieved": "2026-10-18",
463
+ "siteFigure": "fig:scheme_incandescent",
464
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_incandescent"
465
+ }
466
+ };
467
+
468
+ export const iridescent = {
469
+ "id": "iridescent",
470
+ "kind": "sequential",
471
+ "colors": [
472
+ {
473
+ "hex": "#FEFBE9"
474
+ },
475
+ {
476
+ "hex": "#FCF7D5"
477
+ },
478
+ {
479
+ "hex": "#F5F3C1"
480
+ },
481
+ {
482
+ "hex": "#EAF0B5"
483
+ },
484
+ {
485
+ "hex": "#DDECBF"
486
+ },
487
+ {
488
+ "hex": "#D0E7CA"
489
+ },
490
+ {
491
+ "hex": "#C2E3D2"
492
+ },
493
+ {
494
+ "hex": "#B5DDD8"
495
+ },
496
+ {
497
+ "hex": "#A8D8DC"
498
+ },
499
+ {
500
+ "hex": "#9BD2E1"
501
+ },
502
+ {
503
+ "hex": "#8DCBE4"
504
+ },
505
+ {
506
+ "hex": "#81C4E7"
507
+ },
508
+ {
509
+ "hex": "#7BBCE7"
510
+ },
511
+ {
512
+ "hex": "#7EB2E4"
513
+ },
514
+ {
515
+ "hex": "#88A5DD"
516
+ },
517
+ {
518
+ "hex": "#9398D2"
519
+ },
520
+ {
521
+ "hex": "#9B8AC4"
522
+ },
523
+ {
524
+ "hex": "#9D7DB2"
525
+ },
526
+ {
527
+ "hex": "#9A709E"
528
+ },
529
+ {
530
+ "hex": "#906388"
531
+ },
532
+ {
533
+ "hex": "#805770"
534
+ },
535
+ {
536
+ "hex": "#684957"
537
+ },
538
+ {
539
+ "hex": "#46353A"
540
+ }
541
+ ],
542
+ "bad": "#999999",
543
+ "interpolation": "linear",
544
+ "source": {
545
+ "retrieved": "2026-10-18",
546
+ "siteFigure": "fig:scheme_iridescent",
547
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_iridescent",
548
+ "module": "tol_cmap('iridescent')",
549
+ "moduleName": "iridescent",
550
+ "moduleVersion": "2022.10"
551
+ }
552
+ };
553
+
554
+ export const light = {
555
+ "id": "light",
556
+ "kind": "qualitative",
557
+ "colors": [
558
+ {
559
+ "hex": "#77AADD",
560
+ "name": "light_blue"
561
+ },
562
+ {
563
+ "hex": "#EE8866",
564
+ "name": "orange"
565
+ },
566
+ {
567
+ "hex": "#EEDD88",
568
+ "name": "light_yellow"
569
+ },
570
+ {
571
+ "hex": "#FFAABB",
572
+ "name": "pink"
573
+ },
574
+ {
575
+ "hex": "#99DDFF",
576
+ "name": "light_cyan"
577
+ },
578
+ {
579
+ "hex": "#44BB99",
580
+ "name": "mint"
581
+ },
582
+ {
583
+ "hex": "#BBCC33",
584
+ "name": "pear"
585
+ },
586
+ {
587
+ "hex": "#AAAA00",
588
+ "name": "olive"
589
+ },
590
+ {
591
+ "hex": "#DDDDDD",
592
+ "name": "pale_grey"
593
+ }
594
+ ],
595
+ "extras": [
596
+ {
597
+ "hex": "#000000",
598
+ "name": "black"
599
+ }
600
+ ],
601
+ "interpolation": "none",
602
+ "source": {
603
+ "retrieved": "2026-10-18",
604
+ "siteFigure": "fig:scheme_light",
605
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_light",
606
+ "module": "tol_cset('light')",
607
+ "moduleVersion": "2022.10"
608
+ }
609
+ };
610
+
611
+ export const mediumContrast = {
612
+ "id": "medium-contrast",
613
+ "kind": "qualitative",
614
+ "colors": [
615
+ {
616
+ "hex": "#6699CC",
617
+ "name": "light_blue"
618
+ },
619
+ {
620
+ "hex": "#004488",
621
+ "name": "dark_blue"
622
+ },
623
+ {
624
+ "hex": "#EECC66",
625
+ "name": "light_yellow"
626
+ },
627
+ {
628
+ "hex": "#994455",
629
+ "name": "dark_red"
630
+ },
631
+ {
632
+ "hex": "#997700",
633
+ "name": "dark_yellow"
634
+ },
635
+ {
636
+ "hex": "#EE99AA",
637
+ "name": "light_red"
638
+ }
639
+ ],
640
+ "extras": [
641
+ {
642
+ "hex": "#000000",
643
+ "name": "black"
644
+ }
645
+ ],
646
+ "interpolation": "none",
647
+ "source": {
648
+ "retrieved": "2026-10-18",
649
+ "siteFigure": "fig:scheme_mediumcontrast",
650
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_mediumcontrast",
651
+ "module": "tol_cset('medium-contrast')",
652
+ "moduleVersion": "2022.10"
653
+ }
654
+ };
655
+
656
+ export const muted = {
657
+ "id": "muted",
658
+ "kind": "qualitative",
659
+ "colors": [
660
+ {
661
+ "hex": "#CC6677",
662
+ "name": "rose"
663
+ },
664
+ {
665
+ "hex": "#332288",
666
+ "name": "indigo"
667
+ },
668
+ {
669
+ "hex": "#DDCC77",
670
+ "name": "sand"
671
+ },
672
+ {
673
+ "hex": "#117733",
674
+ "name": "green"
675
+ },
676
+ {
677
+ "hex": "#88CCEE",
678
+ "name": "cyan"
679
+ },
680
+ {
681
+ "hex": "#882255",
682
+ "name": "wine"
683
+ },
684
+ {
685
+ "hex": "#44AA99",
686
+ "name": "teal"
687
+ },
688
+ {
689
+ "hex": "#999933",
690
+ "name": "olive"
691
+ },
692
+ {
693
+ "hex": "#AA4499",
694
+ "name": "purple"
695
+ }
696
+ ],
697
+ "extras": [
698
+ {
699
+ "hex": "#DDDDDD",
700
+ "name": "pale_grey"
701
+ },
702
+ {
703
+ "hex": "#000000",
704
+ "name": "black"
705
+ }
706
+ ],
707
+ "bad": "#DDDDDD",
708
+ "interpolation": "none",
709
+ "source": {
710
+ "retrieved": "2026-10-18",
711
+ "siteFigure": "fig:scheme_muted",
712
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_muted",
713
+ "module": "tol_cset('muted')",
714
+ "moduleVersion": "2022.10"
715
+ }
716
+ };
717
+
718
+ export const nightfall = {
719
+ "id": "nightfall",
720
+ "kind": "diverging",
721
+ "colors": [
722
+ {
723
+ "hex": "#125A56"
724
+ },
725
+ {
726
+ "hex": "#00767B"
727
+ },
728
+ {
729
+ "hex": "#238F9D"
730
+ },
731
+ {
732
+ "hex": "#42A7C6"
733
+ },
734
+ {
735
+ "hex": "#60BCE9"
736
+ },
737
+ {
738
+ "hex": "#9DCCEF"
739
+ },
740
+ {
741
+ "hex": "#C6DBED"
742
+ },
743
+ {
744
+ "hex": "#DEE6E7"
745
+ },
746
+ {
747
+ "hex": "#ECEADA"
748
+ },
749
+ {
750
+ "hex": "#F0E6B2"
751
+ },
752
+ {
753
+ "hex": "#F9D576"
754
+ },
755
+ {
756
+ "hex": "#FFB954"
757
+ },
758
+ {
759
+ "hex": "#FD9A44"
760
+ },
761
+ {
762
+ "hex": "#F57634"
763
+ },
764
+ {
765
+ "hex": "#E94C1F"
766
+ },
767
+ {
768
+ "hex": "#D11807"
769
+ },
770
+ {
771
+ "hex": "#A01813"
772
+ }
773
+ ],
774
+ "bad": "#FFFFFF",
775
+ "interpolation": "either",
776
+ "source": {
777
+ "retrieved": "2026-10-18",
778
+ "siteFigure": "fig:scheme_nightfall",
779
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_nightfall",
780
+ "module": "tol_cmap('nightfall')",
781
+ "moduleName": "nightfall",
782
+ "moduleVersion": "2022.10"
783
+ },
784
+ "discreteIndexes": [
785
+ 0,
786
+ 2,
787
+ 4,
788
+ 6,
789
+ 8,
790
+ 10,
791
+ 12,
792
+ 14,
793
+ 16
794
+ ]
795
+ };
796
+
797
+ export const pale = {
798
+ "id": "pale",
799
+ "kind": "qualitative",
800
+ "colors": [
801
+ {
802
+ "hex": "#AACCEE"
803
+ },
804
+ {
805
+ "hex": "#CCEEFF"
806
+ },
807
+ {
808
+ "hex": "#BBDDBB"
809
+ },
810
+ {
811
+ "hex": "#EEEEBB"
812
+ },
813
+ {
814
+ "hex": "#FFBBCC"
815
+ },
816
+ {
817
+ "hex": "#EEBBDD"
818
+ },
819
+ {
820
+ "hex": "#DDDDDD"
821
+ }
822
+ ],
823
+ "interpolation": "none",
824
+ "source": {
825
+ "retrieved": "2026-10-18",
826
+ "siteFigure": "fig:scheme_marking",
827
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_marking"
828
+ }
829
+ };
830
+
831
+ export const prgn = {
832
+ "id": "prgn",
833
+ "kind": "diverging",
834
+ "colors": [
835
+ {
836
+ "hex": "#762A83"
837
+ },
838
+ {
839
+ "hex": "#9970AB"
840
+ },
841
+ {
842
+ "hex": "#C2A5CF"
843
+ },
844
+ {
845
+ "hex": "#E7D4E8"
846
+ },
847
+ {
848
+ "hex": "#F7F7F7"
849
+ },
850
+ {
851
+ "hex": "#D9F0D3"
852
+ },
853
+ {
854
+ "hex": "#ACD39E"
855
+ },
856
+ {
857
+ "hex": "#5AAE61"
858
+ },
859
+ {
860
+ "hex": "#1B7837"
861
+ }
862
+ ],
863
+ "bad": "#FFEE99",
864
+ "interpolation": "either",
865
+ "source": {
866
+ "retrieved": "2026-10-18",
867
+ "siteFigure": "fig:scheme_prgn",
868
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_prgn",
869
+ "module": "tol_cmap('PRGn')",
870
+ "moduleName": "PRGn",
871
+ "moduleVersion": "2022.10"
872
+ }
873
+ };
874
+
875
+ export const rainbowDiscrete = {
876
+ "id": "rainbow-discrete",
877
+ "kind": "sequential",
878
+ "colors": [
879
+ {
880
+ "hex": "#E8ECFB"
881
+ },
882
+ {
883
+ "hex": "#D9CCE3"
884
+ },
885
+ {
886
+ "hex": "#D1BBD7"
887
+ },
888
+ {
889
+ "hex": "#CAACCB"
890
+ },
891
+ {
892
+ "hex": "#BA8DB4"
893
+ },
894
+ {
895
+ "hex": "#AE76A3"
896
+ },
897
+ {
898
+ "hex": "#AA6F9E"
899
+ },
900
+ {
901
+ "hex": "#994F88"
902
+ },
903
+ {
904
+ "hex": "#882E72"
905
+ },
906
+ {
907
+ "hex": "#1965B0"
908
+ },
909
+ {
910
+ "hex": "#437DBF"
911
+ },
912
+ {
913
+ "hex": "#5289C7"
914
+ },
915
+ {
916
+ "hex": "#6195CF"
917
+ },
918
+ {
919
+ "hex": "#7BAFDE"
920
+ },
921
+ {
922
+ "hex": "#4EB265"
923
+ },
924
+ {
925
+ "hex": "#90C987"
926
+ },
927
+ {
928
+ "hex": "#CAE0AB"
929
+ },
930
+ {
931
+ "hex": "#F7F056"
932
+ },
933
+ {
934
+ "hex": "#F7CB45"
935
+ },
936
+ {
937
+ "hex": "#F6C141"
938
+ },
939
+ {
940
+ "hex": "#F4A736"
941
+ },
942
+ {
943
+ "hex": "#F1932D"
944
+ },
945
+ {
946
+ "hex": "#EE8026"
947
+ },
948
+ {
949
+ "hex": "#E8601C"
950
+ },
951
+ {
952
+ "hex": "#E65518"
953
+ },
954
+ {
955
+ "hex": "#DC050C"
956
+ },
957
+ {
958
+ "hex": "#A5170E"
959
+ },
960
+ {
961
+ "hex": "#72190E"
962
+ },
963
+ {
964
+ "hex": "#42150A"
965
+ }
966
+ ],
967
+ "bad": "#FFFFFF",
968
+ "interpolation": "none",
969
+ "lut": [
970
+ [
971
+ 9
972
+ ],
973
+ [
974
+ 9,
975
+ 25
976
+ ],
977
+ [
978
+ 9,
979
+ 17,
980
+ 25
981
+ ],
982
+ [
983
+ 9,
984
+ 14,
985
+ 17,
986
+ 25
987
+ ],
988
+ [
989
+ 9,
990
+ 13,
991
+ 14,
992
+ 17,
993
+ 25
994
+ ],
995
+ [
996
+ 9,
997
+ 13,
998
+ 14,
999
+ 16,
1000
+ 17,
1001
+ 25
1002
+ ],
1003
+ [
1004
+ 8,
1005
+ 9,
1006
+ 13,
1007
+ 14,
1008
+ 16,
1009
+ 17,
1010
+ 25
1011
+ ],
1012
+ [
1013
+ 8,
1014
+ 9,
1015
+ 13,
1016
+ 14,
1017
+ 16,
1018
+ 17,
1019
+ 22,
1020
+ 25
1021
+ ],
1022
+ [
1023
+ 8,
1024
+ 9,
1025
+ 13,
1026
+ 14,
1027
+ 16,
1028
+ 17,
1029
+ 22,
1030
+ 25,
1031
+ 27
1032
+ ],
1033
+ [
1034
+ 8,
1035
+ 9,
1036
+ 13,
1037
+ 14,
1038
+ 16,
1039
+ 17,
1040
+ 20,
1041
+ 23,
1042
+ 25,
1043
+ 27
1044
+ ],
1045
+ [
1046
+ 8,
1047
+ 9,
1048
+ 11,
1049
+ 13,
1050
+ 14,
1051
+ 16,
1052
+ 17,
1053
+ 20,
1054
+ 23,
1055
+ 25,
1056
+ 27
1057
+ ],
1058
+ [
1059
+ 2,
1060
+ 5,
1061
+ 8,
1062
+ 9,
1063
+ 11,
1064
+ 13,
1065
+ 14,
1066
+ 16,
1067
+ 17,
1068
+ 20,
1069
+ 23,
1070
+ 25
1071
+ ],
1072
+ [
1073
+ 2,
1074
+ 5,
1075
+ 8,
1076
+ 9,
1077
+ 11,
1078
+ 13,
1079
+ 14,
1080
+ 15,
1081
+ 16,
1082
+ 17,
1083
+ 20,
1084
+ 23,
1085
+ 25
1086
+ ],
1087
+ [
1088
+ 2,
1089
+ 5,
1090
+ 8,
1091
+ 9,
1092
+ 11,
1093
+ 13,
1094
+ 14,
1095
+ 15,
1096
+ 16,
1097
+ 17,
1098
+ 19,
1099
+ 21,
1100
+ 23,
1101
+ 25
1102
+ ],
1103
+ [
1104
+ 2,
1105
+ 5,
1106
+ 8,
1107
+ 9,
1108
+ 11,
1109
+ 13,
1110
+ 14,
1111
+ 15,
1112
+ 16,
1113
+ 17,
1114
+ 19,
1115
+ 21,
1116
+ 23,
1117
+ 25,
1118
+ 27
1119
+ ],
1120
+ [
1121
+ 2,
1122
+ 4,
1123
+ 6,
1124
+ 8,
1125
+ 9,
1126
+ 11,
1127
+ 13,
1128
+ 14,
1129
+ 15,
1130
+ 16,
1131
+ 17,
1132
+ 19,
1133
+ 21,
1134
+ 23,
1135
+ 25,
1136
+ 27
1137
+ ],
1138
+ [
1139
+ 2,
1140
+ 4,
1141
+ 6,
1142
+ 7,
1143
+ 8,
1144
+ 9,
1145
+ 11,
1146
+ 13,
1147
+ 14,
1148
+ 15,
1149
+ 16,
1150
+ 17,
1151
+ 19,
1152
+ 21,
1153
+ 23,
1154
+ 25,
1155
+ 27
1156
+ ],
1157
+ [
1158
+ 2,
1159
+ 4,
1160
+ 6,
1161
+ 7,
1162
+ 8,
1163
+ 9,
1164
+ 11,
1165
+ 13,
1166
+ 14,
1167
+ 15,
1168
+ 16,
1169
+ 17,
1170
+ 19,
1171
+ 21,
1172
+ 23,
1173
+ 25,
1174
+ 26,
1175
+ 27
1176
+ ],
1177
+ [
1178
+ 1,
1179
+ 3,
1180
+ 4,
1181
+ 6,
1182
+ 7,
1183
+ 8,
1184
+ 9,
1185
+ 11,
1186
+ 13,
1187
+ 14,
1188
+ 15,
1189
+ 16,
1190
+ 17,
1191
+ 19,
1192
+ 21,
1193
+ 23,
1194
+ 25,
1195
+ 26,
1196
+ 27
1197
+ ],
1198
+ [
1199
+ 1,
1200
+ 3,
1201
+ 4,
1202
+ 6,
1203
+ 7,
1204
+ 8,
1205
+ 9,
1206
+ 10,
1207
+ 12,
1208
+ 13,
1209
+ 14,
1210
+ 15,
1211
+ 16,
1212
+ 17,
1213
+ 19,
1214
+ 21,
1215
+ 23,
1216
+ 25,
1217
+ 26,
1218
+ 27
1219
+ ],
1220
+ [
1221
+ 1,
1222
+ 3,
1223
+ 4,
1224
+ 6,
1225
+ 7,
1226
+ 8,
1227
+ 9,
1228
+ 10,
1229
+ 12,
1230
+ 13,
1231
+ 14,
1232
+ 15,
1233
+ 16,
1234
+ 17,
1235
+ 18,
1236
+ 20,
1237
+ 22,
1238
+ 24,
1239
+ 25,
1240
+ 26,
1241
+ 27
1242
+ ],
1243
+ [
1244
+ 1,
1245
+ 3,
1246
+ 4,
1247
+ 6,
1248
+ 7,
1249
+ 8,
1250
+ 9,
1251
+ 10,
1252
+ 12,
1253
+ 13,
1254
+ 14,
1255
+ 15,
1256
+ 16,
1257
+ 17,
1258
+ 18,
1259
+ 20,
1260
+ 22,
1261
+ 24,
1262
+ 25,
1263
+ 26,
1264
+ 27,
1265
+ 28
1266
+ ],
1267
+ [
1268
+ 0,
1269
+ 1,
1270
+ 3,
1271
+ 4,
1272
+ 6,
1273
+ 7,
1274
+ 8,
1275
+ 9,
1276
+ 10,
1277
+ 12,
1278
+ 13,
1279
+ 14,
1280
+ 15,
1281
+ 16,
1282
+ 17,
1283
+ 18,
1284
+ 20,
1285
+ 22,
1286
+ 24,
1287
+ 25,
1288
+ 26,
1289
+ 27,
1290
+ 28
1291
+ ]
1292
+ ],
1293
+ "lutBad": {
1294
+ "23": "#777777"
1295
+ },
1296
+ "source": {
1297
+ "retrieved": "2026-10-18",
1298
+ "siteFigure": "fig:scheme_rainbow_discrete",
1299
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_rainbow_discrete",
1300
+ "module": "tol_cmap('rainbow_discrete', lut)",
1301
+ "moduleName": "rainbow_discrete",
1302
+ "moduleVersion": "2022.10"
1303
+ }
1304
+ };
1305
+
1306
+ export const rainbowSmooth = {
1307
+ "id": "rainbow-smooth",
1308
+ "kind": "sequential",
1309
+ "colors": [
1310
+ {
1311
+ "hex": "#E8ECFB"
1312
+ },
1313
+ {
1314
+ "hex": "#DDD8EF"
1315
+ },
1316
+ {
1317
+ "hex": "#D1C1E1"
1318
+ },
1319
+ {
1320
+ "hex": "#C3A8D1"
1321
+ },
1322
+ {
1323
+ "hex": "#B58FC2"
1324
+ },
1325
+ {
1326
+ "hex": "#A778B4"
1327
+ },
1328
+ {
1329
+ "hex": "#9B62A7"
1330
+ },
1331
+ {
1332
+ "hex": "#8C4E99"
1333
+ },
1334
+ {
1335
+ "hex": "#6F4C9B"
1336
+ },
1337
+ {
1338
+ "hex": "#6059A9"
1339
+ },
1340
+ {
1341
+ "hex": "#5568B8"
1342
+ },
1343
+ {
1344
+ "hex": "#4E79C5"
1345
+ },
1346
+ {
1347
+ "hex": "#4D8AC6"
1348
+ },
1349
+ {
1350
+ "hex": "#4E96BC"
1351
+ },
1352
+ {
1353
+ "hex": "#549EB3"
1354
+ },
1355
+ {
1356
+ "hex": "#59A5A9"
1357
+ },
1358
+ {
1359
+ "hex": "#60AB9E"
1360
+ },
1361
+ {
1362
+ "hex": "#69B190"
1363
+ },
1364
+ {
1365
+ "hex": "#77B77D"
1366
+ },
1367
+ {
1368
+ "hex": "#8CBC68"
1369
+ },
1370
+ {
1371
+ "hex": "#A6BE54"
1372
+ },
1373
+ {
1374
+ "hex": "#BEBC48"
1375
+ },
1376
+ {
1377
+ "hex": "#D1B541"
1378
+ },
1379
+ {
1380
+ "hex": "#DDAA3C"
1381
+ },
1382
+ {
1383
+ "hex": "#E49C39"
1384
+ },
1385
+ {
1386
+ "hex": "#E78C35"
1387
+ },
1388
+ {
1389
+ "hex": "#E67932"
1390
+ },
1391
+ {
1392
+ "hex": "#E4632D"
1393
+ },
1394
+ {
1395
+ "hex": "#DF4828"
1396
+ },
1397
+ {
1398
+ "hex": "#DA2222"
1399
+ },
1400
+ {
1401
+ "hex": "#B8221E"
1402
+ },
1403
+ {
1404
+ "hex": "#95211B"
1405
+ },
1406
+ {
1407
+ "hex": "#721E17"
1408
+ },
1409
+ {
1410
+ "hex": "#521A13"
1411
+ }
1412
+ ],
1413
+ "bad": "#666666",
1414
+ "interpolation": "linear",
1415
+ "subranges": [
1416
+ {
1417
+ "id": "rainbow_WhRd",
1418
+ "from": 0,
1419
+ "to": 29,
1420
+ "bad": "#666666"
1421
+ },
1422
+ {
1423
+ "id": "rainbow_WhBr",
1424
+ "from": 0,
1425
+ "to": 33,
1426
+ "bad": "#666666"
1427
+ },
1428
+ {
1429
+ "id": "rainbow_PuRd",
1430
+ "from": 8,
1431
+ "to": 29,
1432
+ "bad": "#FFFFFF"
1433
+ },
1434
+ {
1435
+ "id": "rainbow_PuBr",
1436
+ "from": 8,
1437
+ "to": 33,
1438
+ "bad": "#FFFFFF"
1439
+ }
1440
+ ],
1441
+ "source": {
1442
+ "retrieved": "2026-10-18",
1443
+ "siteFigure": "fig:scheme_rainbow_smooth",
1444
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_rainbow_smooth",
1445
+ "module": "tol_cmap('rainbow_*')",
1446
+ "moduleVersion": "2022.10"
1447
+ }
1448
+ };
1449
+
1450
+ export const sunset = {
1451
+ "id": "sunset",
1452
+ "kind": "diverging",
1453
+ "colors": [
1454
+ {
1455
+ "hex": "#364B9A"
1456
+ },
1457
+ {
1458
+ "hex": "#4A7BB7"
1459
+ },
1460
+ {
1461
+ "hex": "#6EA6CD"
1462
+ },
1463
+ {
1464
+ "hex": "#98CAE1"
1465
+ },
1466
+ {
1467
+ "hex": "#C2E4EF"
1468
+ },
1469
+ {
1470
+ "hex": "#EAECCC"
1471
+ },
1472
+ {
1473
+ "hex": "#FEDA8B"
1474
+ },
1475
+ {
1476
+ "hex": "#FDB366"
1477
+ },
1478
+ {
1479
+ "hex": "#F67E4B"
1480
+ },
1481
+ {
1482
+ "hex": "#DD3D2D"
1483
+ },
1484
+ {
1485
+ "hex": "#A50026"
1486
+ }
1487
+ ],
1488
+ "bad": "#FFFFFF",
1489
+ "interpolation": "either",
1490
+ "source": {
1491
+ "retrieved": "2026-10-18",
1492
+ "siteFigure": "fig:scheme_sunset",
1493
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_sunset",
1494
+ "module": "tol_cmap('sunset')",
1495
+ "moduleName": "sunset",
1496
+ "moduleVersion": "2022.10"
1497
+ }
1498
+ };
1499
+
1500
+ export const vibrant = {
1501
+ "id": "vibrant",
1502
+ "kind": "qualitative",
1503
+ "colors": [
1504
+ {
1505
+ "hex": "#EE7733",
1506
+ "name": "orange"
1507
+ },
1508
+ {
1509
+ "hex": "#0077BB",
1510
+ "name": "blue"
1511
+ },
1512
+ {
1513
+ "hex": "#33BBEE",
1514
+ "name": "cyan"
1515
+ },
1516
+ {
1517
+ "hex": "#EE3377",
1518
+ "name": "magenta"
1519
+ },
1520
+ {
1521
+ "hex": "#CC3311",
1522
+ "name": "red"
1523
+ },
1524
+ {
1525
+ "hex": "#009988",
1526
+ "name": "teal"
1527
+ },
1528
+ {
1529
+ "hex": "#BBBBBB",
1530
+ "name": "grey"
1531
+ }
1532
+ ],
1533
+ "extras": [
1534
+ {
1535
+ "hex": "#000000",
1536
+ "name": "black"
1537
+ }
1538
+ ],
1539
+ "interpolation": "none",
1540
+ "source": {
1541
+ "retrieved": "2026-10-18",
1542
+ "siteFigure": "fig:scheme_vibrant",
1543
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_vibrant",
1544
+ "module": "tol_cset('vibrant')",
1545
+ "moduleVersion": "2022.10"
1546
+ }
1547
+ };
1548
+
1549
+ export const whorbr = {
1550
+ "id": "whorbr",
1551
+ "kind": "sequential",
1552
+ "colors": [
1553
+ {
1554
+ "hex": "#FFFFFF"
1555
+ },
1556
+ {
1557
+ "hex": "#FFF7BC"
1558
+ },
1559
+ {
1560
+ "hex": "#FEE391"
1561
+ },
1562
+ {
1563
+ "hex": "#FEC44F"
1564
+ },
1565
+ {
1566
+ "hex": "#FB9A29"
1567
+ },
1568
+ {
1569
+ "hex": "#EC7014"
1570
+ },
1571
+ {
1572
+ "hex": "#CC4C02"
1573
+ },
1574
+ {
1575
+ "hex": "#993404"
1576
+ },
1577
+ {
1578
+ "hex": "#662506"
1579
+ }
1580
+ ],
1581
+ "bad": "#888888",
1582
+ "interpolation": "linear",
1583
+ "source": {
1584
+ "retrieved": "2026-10-18",
1585
+ "module": "tol_cmap('WhOrBr')",
1586
+ "moduleName": "WhOrBr",
1587
+ "moduleVersion": "2022.10",
1588
+ "notes": [
1589
+ "Equals ylorbr with a white first colour."
1590
+ ]
1591
+ }
1592
+ };
1593
+
1594
+ export const ylorbr = {
1595
+ "id": "ylorbr",
1596
+ "kind": "sequential",
1597
+ "colors": [
1598
+ {
1599
+ "hex": "#FFFFE5"
1600
+ },
1601
+ {
1602
+ "hex": "#FFF7BC"
1603
+ },
1604
+ {
1605
+ "hex": "#FEE391"
1606
+ },
1607
+ {
1608
+ "hex": "#FEC44F"
1609
+ },
1610
+ {
1611
+ "hex": "#FB9A29"
1612
+ },
1613
+ {
1614
+ "hex": "#EC7014"
1615
+ },
1616
+ {
1617
+ "hex": "#CC4C02"
1618
+ },
1619
+ {
1620
+ "hex": "#993404"
1621
+ },
1622
+ {
1623
+ "hex": "#662506"
1624
+ }
1625
+ ],
1626
+ "bad": "#888888",
1627
+ "interpolation": "either",
1628
+ "source": {
1629
+ "retrieved": "2026-10-18",
1630
+ "siteFigure": "fig:scheme_ylorbr",
1631
+ "siteUrl": "https://sronpersonalpages.nl/~pault/#fig:scheme_ylorbr",
1632
+ "module": "tol_cmap('YlOrBr')",
1633
+ "moduleName": "YlOrBr",
1634
+ "moduleVersion": "2022.10"
1635
+ }
1636
+ };
1637
+
1638
+ export const schemes = {
1639
+ "banded-12": banded12,
1640
+ "banded-16": banded16,
1641
+ "banded-20": banded20,
1642
+ "bright": bright,
1643
+ "burd": burd,
1644
+ "dark": dark,
1645
+ "groundcover": groundcover,
1646
+ "high-contrast": highContrast,
1647
+ "incandescent": incandescent,
1648
+ "iridescent": iridescent,
1649
+ "light": light,
1650
+ "medium-contrast": mediumContrast,
1651
+ "muted": muted,
1652
+ "nightfall": nightfall,
1653
+ "pale": pale,
1654
+ "prgn": prgn,
1655
+ "rainbow-discrete": rainbowDiscrete,
1656
+ "rainbow-smooth": rainbowSmooth,
1657
+ "sunset": sunset,
1658
+ "vibrant": vibrant,
1659
+ "whorbr": whorbr,
1660
+ "ylorbr": ylorbr,
1661
+ };
1662
+
1663
+ export const schemeList = [
1664
+ banded12,
1665
+ banded16,
1666
+ banded20,
1667
+ bright,
1668
+ burd,
1669
+ dark,
1670
+ groundcover,
1671
+ highContrast,
1672
+ incandescent,
1673
+ iridescent,
1674
+ light,
1675
+ mediumContrast,
1676
+ muted,
1677
+ nightfall,
1678
+ pale,
1679
+ prgn,
1680
+ rainbowDiscrete,
1681
+ rainbowSmooth,
1682
+ sunset,
1683
+ vibrant,
1684
+ whorbr,
1685
+ ylorbr,
1686
+ ];
1687
+
1688
+ /**
1689
+ * Look up a scheme by its canonical id (returns undefined if unknown).
1690
+ * @param {string} id
1691
+ */
1692
+ export function get(id) {
1693
+ return Object.prototype.hasOwnProperty.call(schemes, id) ? schemes[id] : undefined;
1694
+ }
1695
+
1696
+ /**
1697
+ * Look up a scheme by id or return a passed scheme object; throws RangeError if unknown.
1698
+ * @param {string | object} schemeOrId
1699
+ */
1700
+ export function getScheme(schemeOrId) {
1701
+ if (schemeOrId && typeof schemeOrId === 'object' && Array.isArray(schemeOrId.colors)) {
1702
+ return schemeOrId;
1703
+ }
1704
+ const s = get(String(schemeOrId));
1705
+ if (!s) throw new RangeError(`Unknown Paul Tol scheme: ${schemeOrId}`);
1706
+ return s;
1707
+ }
1708
+
1709
+ /**
1710
+ * Parse a #RRGGBB hex string into [r, g, b] integers in 0..255.
1711
+ * @param {string} hex
1712
+ * @returns {[number, number, number]}
1713
+ */
1714
+ export function hexToRgb(hex) {
1715
+ if (typeof hex !== 'string' || !/^#[0-9A-Fa-f]{6}$/.test(hex)) {
1716
+ throw new TypeError(`Invalid #RRGGBB hex colour: ${hex}`);
1717
+ }
1718
+ return [
1719
+ Number.parseInt(hex.slice(1, 3), 16),
1720
+ Number.parseInt(hex.slice(3, 5), 16),
1721
+ Number.parseInt(hex.slice(5, 7), 16),
1722
+ ];
1723
+ }
1724
+
1725
+ /**
1726
+ * Format [r, g, b] integers (0..255) into an uppercase #RRGGBB hex string.
1727
+ * @param {number} r
1728
+ * @param {number} g
1729
+ * @param {number} b
1730
+ * @returns {string}
1731
+ */
1732
+ export function rgbToHex(r, g, b) {
1733
+ const clamp = (v) => Math.max(0, Math.min(255, Math.round(v)));
1734
+ const hex2 = (v) => clamp(v).toString(16).toUpperCase().padStart(2, '0');
1735
+ return `#${hex2(r)}${hex2(g)}${hex2(b)}`;
1736
+ }
1737
+
1738
+ /**
1739
+ * Linearly interpolate a scheme in sRGB at position t in [0, 1].
1740
+ * Only allowed for schemes with interpolation: 'linear' | 'either'.
1741
+ * @param {string | object} schemeOrId
1742
+ * @param {number} t
1743
+ * @param {{ subrange?: string }} [options]
1744
+ * @returns {string}
1745
+ */
1746
+ export function interpolate(schemeOrId, t, options = {}) {
1747
+ if (typeof t !== 'number' || !Number.isFinite(t)) {
1748
+ throw new TypeError(`Expected a finite number t in [0, 1], got ${t}`);
1749
+ }
1750
+ const scheme = getScheme(schemeOrId);
1751
+ if (scheme.interpolation === 'none') {
1752
+ throw new TypeError(`Scheme "${scheme.id}" does not support linear interpolation (interpolation: "none")`);
1753
+ }
1754
+ let stops = scheme.colors;
1755
+ if (options && options.subrange) {
1756
+ const sub = (scheme.subranges ?? []).find((r) => r.id === options.subrange);
1757
+ if (!sub) {
1758
+ throw new RangeError(`Unknown subrange "${options.subrange}" for scheme "${scheme.id}"`);
1759
+ }
1760
+ stops = scheme.colors.slice(sub.from, sub.to + 1);
1761
+ }
1762
+ const clamped = Math.max(0, Math.min(1, t));
1763
+ const maxIndex = stops.length - 1;
1764
+ if (maxIndex === 0 || clamped === 0) return stops[0].hex;
1765
+ if (clamped === 1) return stops[maxIndex].hex;
1766
+
1767
+ const pos = clamped * maxIndex;
1768
+ const lo = Math.floor(pos);
1769
+ const hi = Math.ceil(pos);
1770
+ if (lo === hi) return stops[lo].hex;
1771
+
1772
+ const frac = pos - lo;
1773
+ const [r0, g0, b0] = hexToRgb(stops[lo].hex);
1774
+ const [r1, g1, b1] = hexToRgb(stops[hi].hex);
1775
+ return rgbToHex(r0 + frac * (r1 - r0), g0 + frac * (g1 - g0), b0 + frac * (b1 - b0));
1776
+ }
1777
+
1778
+ /**
1779
+ * Sample `count` evenly spaced interpolated hex stops across [0, 1].
1780
+ * @param {string | object} schemeOrId
1781
+ * @param {number} count
1782
+ * @param {{ subrange?: string }} [options]
1783
+ * @returns {string[]}
1784
+ */
1785
+ export function sample(schemeOrId, count, options = {}) {
1786
+ if (!Number.isInteger(count) || count < 1) {
1787
+ throw new RangeError(`Sample count must be a positive integer, got ${count}`);
1788
+ }
1789
+ if (count === 1) return [interpolate(schemeOrId, 0.5, options)];
1790
+ const out = [];
1791
+ for (let i = 0; i < count; i++) {
1792
+ out.push(interpolate(schemeOrId, i / (count - 1), options));
1793
+ }
1794
+ return out;
1795
+ }
1796
+
1797
+ /**
1798
+ * Return the discrete rainbow palette of length n (1 <= n <= 23).
1799
+ * @param {number} n
1800
+ * @returns {string[]}
1801
+ */
1802
+ export function discreteRainbow(n) {
1803
+ const lut = rainbowDiscrete.lut;
1804
+ if (!Number.isInteger(n) || n < 1 || n > lut.length) {
1805
+ throw new RangeError(`discreteRainbow length must be an integer in 1..${lut.length}, got ${n}`);
1806
+ }
1807
+ return lut[n - 1].map((idx) => rainbowDiscrete.colors[idx].hex);
1808
+ }
1809
+
1810
+ /**
1811
+ * Return the bad-data colour for discrete rainbow of length n (1 <= n <= 23).
1812
+ * @param {number} n
1813
+ * @returns {string}
1814
+ */
1815
+ export function discreteRainbowBad(n) {
1816
+ const lut = rainbowDiscrete.lut;
1817
+ if (!Number.isInteger(n) || n < 1 || n > lut.length) {
1818
+ throw new RangeError(`discreteRainbowBad length must be an integer in 1..${lut.length}, got ${n}`);
1819
+ }
1820
+ return rainbowDiscrete.lutBad?.[String(n)] ?? rainbowDiscrete.bad;
1821
+ }
1822
+
1823
+ /**
1824
+ * Return the discrete hex colour list for a scheme.
1825
+ * - For rainbow-discrete, requires or uses n (defaults to max lut length 23).
1826
+ * - For schemes with discreteIndexes (e.g. nightfall), returns the indexed subset.
1827
+ * - Otherwise returns all defined stops in order.
1828
+ * @param {string | object} schemeOrId
1829
+ * @param {number} [n]
1830
+ * @returns {string[]}
1831
+ */
1832
+ export function discreteColors(schemeOrId, n) {
1833
+ const scheme = getScheme(schemeOrId);
1834
+ if (scheme.lut) {
1835
+ const len = n === undefined ? scheme.lut.length : n;
1836
+ if (!Number.isInteger(len) || len < 1 || len > scheme.lut.length) {
1837
+ throw new RangeError(`Length for "${scheme.id}" must be an integer in 1..${scheme.lut.length}, got ${len}`);
1838
+ }
1839
+ return scheme.lut[len - 1].map((idx) => scheme.colors[idx].hex);
1840
+ }
1841
+ if (scheme.discreteIndexes) {
1842
+ return scheme.discreteIndexes.map((idx) => scheme.colors[idx].hex);
1843
+ }
1844
+ return scheme.colors.map((c) => c.hex);
1845
+ }