@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,15 @@
1
+ GIMP Palette
2
+ Name: tol-pale
3
+ Columns: 7
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 170 204 238 #AACCEE
10
+ 204 238 255 #CCEEFF
11
+ 187 221 187 #BBDDBB
12
+ 238 238 187 #EEEEBB
13
+ 255 187 204 #FFBBCC
14
+ 238 187 221 #EEBBDD
15
+ 221 221 221 #DDDDDD
@@ -0,0 +1,17 @@
1
+ GIMP Palette
2
+ Name: tol-prgn
3
+ Columns: 9
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 118 42 131 #762A83
10
+ 153 112 171 #9970AB
11
+ 194 165 207 #C2A5CF
12
+ 231 212 232 #E7D4E8
13
+ 247 247 247 #F7F7F7
14
+ 217 240 211 #D9F0D3
15
+ 172 211 158 #ACD39E
16
+ 90 174 97 #5AAE61
17
+ 27 120 55 #1B7837
@@ -0,0 +1,37 @@
1
+ GIMP Palette
2
+ Name: tol-rainbow-discrete
3
+ Columns: 16
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 232 236 251 #E8ECFB
10
+ 217 204 227 #D9CCE3
11
+ 209 187 215 #D1BBD7
12
+ 202 172 203 #CAACCB
13
+ 186 141 180 #BA8DB4
14
+ 174 118 163 #AE76A3
15
+ 170 111 158 #AA6F9E
16
+ 153 79 136 #994F88
17
+ 136 46 114 #882E72
18
+ 25 101 176 #1965B0
19
+ 67 125 191 #437DBF
20
+ 82 137 199 #5289C7
21
+ 97 149 207 #6195CF
22
+ 123 175 222 #7BAFDE
23
+ 78 178 101 #4EB265
24
+ 144 201 135 #90C987
25
+ 202 224 171 #CAE0AB
26
+ 247 240 86 #F7F056
27
+ 247 203 69 #F7CB45
28
+ 246 193 65 #F6C141
29
+ 244 167 54 #F4A736
30
+ 241 147 45 #F1932D
31
+ 238 128 38 #EE8026
32
+ 232 96 28 #E8601C
33
+ 230 85 24 #E65518
34
+ 220 5 12 #DC050C
35
+ 165 23 14 #A5170E
36
+ 114 25 14 #72190E
37
+ 66 21 10 #42150A
@@ -0,0 +1,42 @@
1
+ GIMP Palette
2
+ Name: tol-rainbow-smooth
3
+ Columns: 16
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 232 236 251 #E8ECFB
10
+ 221 216 239 #DDD8EF
11
+ 209 193 225 #D1C1E1
12
+ 195 168 209 #C3A8D1
13
+ 181 143 194 #B58FC2
14
+ 167 120 180 #A778B4
15
+ 155 98 167 #9B62A7
16
+ 140 78 153 #8C4E99
17
+ 111 76 155 #6F4C9B
18
+ 96 89 169 #6059A9
19
+ 85 104 184 #5568B8
20
+ 78 121 197 #4E79C5
21
+ 77 138 198 #4D8AC6
22
+ 78 150 188 #4E96BC
23
+ 84 158 179 #549EB3
24
+ 89 165 169 #59A5A9
25
+ 96 171 158 #60AB9E
26
+ 105 177 144 #69B190
27
+ 119 183 125 #77B77D
28
+ 140 188 104 #8CBC68
29
+ 166 190 84 #A6BE54
30
+ 190 188 72 #BEBC48
31
+ 209 181 65 #D1B541
32
+ 221 170 60 #DDAA3C
33
+ 228 156 57 #E49C39
34
+ 231 140 53 #E78C35
35
+ 230 121 50 #E67932
36
+ 228 99 45 #E4632D
37
+ 223 72 40 #DF4828
38
+ 218 34 34 #DA2222
39
+ 184 34 30 #B8221E
40
+ 149 33 27 #95211B
41
+ 114 30 23 #721E17
42
+ 82 26 19 #521A13
@@ -0,0 +1,19 @@
1
+ GIMP Palette
2
+ Name: tol-sunset
3
+ Columns: 11
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 54 75 154 #364B9A
10
+ 74 123 183 #4A7BB7
11
+ 110 166 205 #6EA6CD
12
+ 152 202 225 #98CAE1
13
+ 194 228 239 #C2E4EF
14
+ 234 236 204 #EAECCC
15
+ 254 218 139 #FEDA8B
16
+ 253 179 102 #FDB366
17
+ 246 126 75 #F67E4B
18
+ 221 61 45 #DD3D2D
19
+ 165 0 38 #A50026
@@ -0,0 +1,16 @@
1
+ GIMP Palette
2
+ Name: tol-vibrant
3
+ Columns: 8
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 238 119 51 orange
10
+ 0 119 187 blue
11
+ 51 187 238 cyan
12
+ 238 51 119 magenta
13
+ 204 51 17 red
14
+ 0 153 136 teal
15
+ 187 187 187 grey
16
+ 0 0 0 black
@@ -0,0 +1,17 @@
1
+ GIMP Palette
2
+ Name: tol-whorbr
3
+ Columns: 9
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 255 255 255 #FFFFFF
10
+ 255 247 188 #FFF7BC
11
+ 254 227 145 #FEE391
12
+ 254 196 79 #FEC44F
13
+ 251 154 41 #FB9A29
14
+ 236 112 20 #EC7014
15
+ 204 76 2 #CC4C02
16
+ 153 52 4 #993404
17
+ 102 37 6 #662506
@@ -0,0 +1,17 @@
1
+ GIMP Palette
2
+ Name: tol-ylorbr
3
+ Columns: 9
4
+ # Colour values from Paul Tol's colour schemes (https://sronpersonalpages.nl/~pault/),
5
+ # with the 3-clause BSD notice for values derived from tol_colors.py. See NOTICE.
6
+ # Independent project: not affiliated with or endorsed by Paul Tol.
7
+ # Generated by tools/generate-game.mjs from data/schemes/*.json. Do not edit by hand.
8
+ #
9
+ 255 255 229 #FFFFE5
10
+ 255 247 188 #FFF7BC
11
+ 254 227 145 #FEE391
12
+ 254 196 79 #FEC44F
13
+ 251 154 41 #FB9A29
14
+ 236 112 20 #EC7014
15
+ 204 76 2 #CC4C02
16
+ 153 52 4 #993404
17
+ 102 37 6 #662506
@@ -0,0 +1,92 @@
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 type HexColor = `#${string}`;
9
+ export type SchemeKind = 'qualitative' | 'diverging' | 'sequential' | 'special';
10
+ export type InterpolationMode = 'none' | 'linear' | 'either';
11
+ export type SchemeId = "banded-12" | "banded-16" | "banded-20" | "bright" | "burd" | "dark" | "groundcover" | "high-contrast" | "incandescent" | "iridescent" | "light" | "medium-contrast" | "muted" | "nightfall" | "pale" | "prgn" | "rainbow-discrete" | "rainbow-smooth" | "sunset" | "vibrant" | "whorbr" | "ylorbr";
12
+
13
+ export interface SchemeColor {
14
+ readonly hex: HexColor;
15
+ readonly name?: string;
16
+ }
17
+
18
+ export interface SchemeSubrange {
19
+ readonly id: string;
20
+ readonly from: number;
21
+ readonly to: number;
22
+ readonly bad?: HexColor;
23
+ }
24
+
25
+ export interface SchemeSource {
26
+ readonly retrieved: string;
27
+ readonly siteFigure?: string;
28
+ readonly siteUrl?: string;
29
+ readonly module?: string;
30
+ readonly moduleName?: string;
31
+ readonly moduleVersion?: string;
32
+ readonly notes?: readonly string[];
33
+ }
34
+
35
+ export interface Scheme {
36
+ readonly id: SchemeId;
37
+ readonly kind: SchemeKind;
38
+ readonly colors: readonly SchemeColor[];
39
+ readonly extras?: readonly SchemeColor[];
40
+ readonly bad?: HexColor;
41
+ readonly interpolation: InterpolationMode;
42
+ readonly discreteIndexes?: readonly number[];
43
+ readonly lut?: readonly (readonly number[])[];
44
+ readonly lutBad?: Readonly<Record<string, HexColor>>;
45
+ readonly subranges?: readonly SchemeSubrange[];
46
+ readonly source: SchemeSource;
47
+ }
48
+
49
+ export declare const banded12: Scheme;
50
+ export declare const banded16: Scheme;
51
+ export declare const banded20: Scheme;
52
+ export declare const bright: Scheme;
53
+ export declare const burd: Scheme;
54
+ export declare const dark: Scheme;
55
+ export declare const groundcover: Scheme;
56
+ export declare const highContrast: Scheme;
57
+ export declare const incandescent: Scheme;
58
+ export declare const iridescent: Scheme;
59
+ export declare const light: Scheme;
60
+ export declare const mediumContrast: Scheme;
61
+ export declare const muted: Scheme;
62
+ export declare const nightfall: Scheme;
63
+ export declare const pale: Scheme;
64
+ export declare const prgn: Scheme;
65
+ export declare const rainbowDiscrete: Scheme;
66
+ export declare const rainbowSmooth: Scheme;
67
+ export declare const sunset: Scheme;
68
+ export declare const vibrant: Scheme;
69
+ export declare const whorbr: Scheme;
70
+ export declare const ylorbr: Scheme;
71
+
72
+ export declare const schemes: Readonly<Record<SchemeId, Scheme>>;
73
+ export declare const schemeList: readonly Scheme[];
74
+
75
+ export declare function get(id: SchemeId): Scheme;
76
+ export declare function get(id: string): Scheme | undefined;
77
+ export declare function getScheme(schemeOrId: Scheme | SchemeId | string): Scheme;
78
+ export declare function hexToRgb(hex: string): [number, number, number];
79
+ export declare function rgbToHex(r: number, g: number, b: number): HexColor;
80
+ export declare function interpolate(
81
+ schemeOrId: Scheme | SchemeId | string,
82
+ t: number,
83
+ options?: { subrange?: string },
84
+ ): HexColor;
85
+ export declare function sample(
86
+ schemeOrId: Scheme | SchemeId | string,
87
+ count: number,
88
+ options?: { subrange?: string },
89
+ ): HexColor[];
90
+ export declare function discreteRainbow(n: number): HexColor[];
91
+ export declare function discreteRainbowBad(n: number): HexColor;
92
+ export declare function discreteColors(schemeOrId: Scheme | SchemeId | string, n?: number): HexColor[];