@softwarefactory-project/re-ansi 0.7.5 → 0.7.6
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.
- package/README.md +4 -0
- package/package.json +3 -2
- package/src/Ansi.res +21 -1
- package/src/Ansi.res.js +722 -79
- package/src/AnsiColors.res +261 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softwarefactory-project/re-ansi",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "ANSI code to HTML",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
7
7
|
"LICENSE",
|
|
8
8
|
"rescript.json",
|
|
9
9
|
"src/Ansi.res",
|
|
10
|
-
"src/Ansi.res.js"
|
|
10
|
+
"src/Ansi.res.js",
|
|
11
|
+
"src/AnsiColors.res"
|
|
11
12
|
],
|
|
12
13
|
"main": "./src/Ansi.res.js",
|
|
13
14
|
"type": "module",
|
package/src/Ansi.res
CHANGED
|
@@ -78,6 +78,20 @@ module AnsiCode = {
|
|
|
78
78
|
let addStyle = fontStyle => ReactDOM.Style.make(~fontStyle, ());
|
|
79
79
|
let addDecoration = textDecoration => ReactDOM.Style.make(~textDecoration, ());
|
|
80
80
|
let int_of_cp = c => c - 48;
|
|
81
|
+
let int_of_3bcd = (d3, d2, d1) => d3->int_of_cp * 100 + d2->int_of_cp * 10 + d1->int_of_cp;
|
|
82
|
+
|
|
83
|
+
// 256 Colors
|
|
84
|
+
module Color256 = {
|
|
85
|
+
let get = (colorMode: int, colorValue: int): option<code> =>
|
|
86
|
+
colorValue->AnsiColors.heightBitColors->Option.flatMap(color =>
|
|
87
|
+
switch (colorMode->int_of_cp) {
|
|
88
|
+
| 3 => ReactDOM.Style.make(~color, ())->Style->Some
|
|
89
|
+
| 4 => ReactDOM.Style.make(~background=color, ())->Style->Some
|
|
90
|
+
| _ =>
|
|
91
|
+
Js.log3("Unknown 256color code:", colorMode, colorValue);
|
|
92
|
+
None;
|
|
93
|
+
})
|
|
94
|
+
}
|
|
81
95
|
|
|
82
96
|
// Color management
|
|
83
97
|
module ColorCss = {
|
|
@@ -237,7 +251,13 @@ module AnsiCode = {
|
|
|
237
251
|
| None => colorCss->Style->Some
|
|
238
252
|
}
|
|
239
253
|
),
|
|
240
|
-
|
|
254
|
+
)
|
|
255
|
+
// [_8;5;_m
|
|
256
|
+
| [91, fgbg, 56, 59, 53, 59, c1] => (length, Color256.get(fgbg, c1->int_of_cp))
|
|
257
|
+
// [_8;5;__m
|
|
258
|
+
| [91, fgbg, 56, 59, 53, 59, c2, c1] => (length, Color256.get(fgbg, int_of_3bcd(0, c2, c1)))
|
|
259
|
+
// [_8;5;___m
|
|
260
|
+
| [91, fgbg, 56, 59, 53, 59, c3, c2, c1] => (length, Color256.get(fgbg, int_of_3bcd(c3, c2, c1)))
|
|
241
261
|
// [0_;__;__m]
|
|
242
262
|
| [91, 48, style, 59, cm1, cv1, 59, cm2, cv2] as xs
|
|
243
263
|
// [_;__;__m
|
package/src/Ansi.res.js
CHANGED
|
@@ -53,6 +53,518 @@ function sliceToEnd(from, obj) {
|
|
|
53
53
|
}
|
|
54
54
|
__name(sliceToEnd, "sliceToEnd");
|
|
55
55
|
|
|
56
|
+
// src/AnsiColors.res.mjs
|
|
57
|
+
function heightBitColors(code) {
|
|
58
|
+
switch (code) {
|
|
59
|
+
case 1:
|
|
60
|
+
return "#800000";
|
|
61
|
+
case 2:
|
|
62
|
+
return "#008000";
|
|
63
|
+
case 3:
|
|
64
|
+
return "#808000";
|
|
65
|
+
case 4:
|
|
66
|
+
return "#000080";
|
|
67
|
+
case 5:
|
|
68
|
+
return "#800080";
|
|
69
|
+
case 6:
|
|
70
|
+
return "#008080";
|
|
71
|
+
case 7:
|
|
72
|
+
return "#c0c0c0";
|
|
73
|
+
case 0:
|
|
74
|
+
case 16:
|
|
75
|
+
return "#000000";
|
|
76
|
+
case 17:
|
|
77
|
+
return "#00005f";
|
|
78
|
+
case 18:
|
|
79
|
+
return "#000087";
|
|
80
|
+
case 19:
|
|
81
|
+
return "#0000af";
|
|
82
|
+
case 20:
|
|
83
|
+
return "#0000d7";
|
|
84
|
+
case 12:
|
|
85
|
+
case 21:
|
|
86
|
+
return "#0000ff";
|
|
87
|
+
case 22:
|
|
88
|
+
return "#005f00";
|
|
89
|
+
case 23:
|
|
90
|
+
return "#005f5f";
|
|
91
|
+
case 24:
|
|
92
|
+
return "#005f87";
|
|
93
|
+
case 25:
|
|
94
|
+
return "#005faf";
|
|
95
|
+
case 26:
|
|
96
|
+
return "#005fd7";
|
|
97
|
+
case 27:
|
|
98
|
+
return "#005fff";
|
|
99
|
+
case 28:
|
|
100
|
+
return "#008700";
|
|
101
|
+
case 29:
|
|
102
|
+
return "#00875f";
|
|
103
|
+
case 30:
|
|
104
|
+
return "#008787";
|
|
105
|
+
case 31:
|
|
106
|
+
return "#0087af";
|
|
107
|
+
case 32:
|
|
108
|
+
return "#0087d7";
|
|
109
|
+
case 33:
|
|
110
|
+
return "#0087ff";
|
|
111
|
+
case 34:
|
|
112
|
+
return "#00af00";
|
|
113
|
+
case 35:
|
|
114
|
+
return "#00af5f";
|
|
115
|
+
case 36:
|
|
116
|
+
return "#00af87";
|
|
117
|
+
case 37:
|
|
118
|
+
return "#00afaf";
|
|
119
|
+
case 38:
|
|
120
|
+
return "#00afd7";
|
|
121
|
+
case 39:
|
|
122
|
+
return "#00afff";
|
|
123
|
+
case 40:
|
|
124
|
+
return "#00d700";
|
|
125
|
+
case 41:
|
|
126
|
+
return "#00d75f";
|
|
127
|
+
case 42:
|
|
128
|
+
return "#00d787";
|
|
129
|
+
case 43:
|
|
130
|
+
return "#00d7af";
|
|
131
|
+
case 44:
|
|
132
|
+
return "#00d7d7";
|
|
133
|
+
case 45:
|
|
134
|
+
return "#00d7ff";
|
|
135
|
+
case 10:
|
|
136
|
+
case 46:
|
|
137
|
+
return "#00ff00";
|
|
138
|
+
case 47:
|
|
139
|
+
return "#00ff5f";
|
|
140
|
+
case 48:
|
|
141
|
+
return "#00ff87";
|
|
142
|
+
case 49:
|
|
143
|
+
return "#00ffaf";
|
|
144
|
+
case 50:
|
|
145
|
+
return "#00ffd7";
|
|
146
|
+
case 14:
|
|
147
|
+
case 51:
|
|
148
|
+
return "#00ffff";
|
|
149
|
+
case 52:
|
|
150
|
+
return "#5f0000";
|
|
151
|
+
case 53:
|
|
152
|
+
return "#5f005f";
|
|
153
|
+
case 54:
|
|
154
|
+
return "#5f0087";
|
|
155
|
+
case 55:
|
|
156
|
+
return "#5f00af";
|
|
157
|
+
case 56:
|
|
158
|
+
return "#5f00d7";
|
|
159
|
+
case 57:
|
|
160
|
+
return "#5f00ff";
|
|
161
|
+
case 58:
|
|
162
|
+
return "#5f5f00";
|
|
163
|
+
case 59:
|
|
164
|
+
return "#5f5f5f";
|
|
165
|
+
case 60:
|
|
166
|
+
return "#5f5f87";
|
|
167
|
+
case 61:
|
|
168
|
+
return "#5f5faf";
|
|
169
|
+
case 62:
|
|
170
|
+
return "#5f5fd7";
|
|
171
|
+
case 63:
|
|
172
|
+
return "#5f5fff";
|
|
173
|
+
case 64:
|
|
174
|
+
return "#5f8700";
|
|
175
|
+
case 65:
|
|
176
|
+
return "#5f875f";
|
|
177
|
+
case 66:
|
|
178
|
+
return "#5f8787";
|
|
179
|
+
case 67:
|
|
180
|
+
return "#5f87af";
|
|
181
|
+
case 68:
|
|
182
|
+
return "#5f87d7";
|
|
183
|
+
case 69:
|
|
184
|
+
return "#5f87ff";
|
|
185
|
+
case 70:
|
|
186
|
+
return "#5faf00";
|
|
187
|
+
case 71:
|
|
188
|
+
return "#5faf5f";
|
|
189
|
+
case 72:
|
|
190
|
+
return "#5faf87";
|
|
191
|
+
case 73:
|
|
192
|
+
return "#5fafaf";
|
|
193
|
+
case 74:
|
|
194
|
+
return "#5fafd7";
|
|
195
|
+
case 75:
|
|
196
|
+
return "#5fafff";
|
|
197
|
+
case 76:
|
|
198
|
+
return "#5fd700";
|
|
199
|
+
case 77:
|
|
200
|
+
return "#5fd75f";
|
|
201
|
+
case 78:
|
|
202
|
+
return "#5fd787";
|
|
203
|
+
case 79:
|
|
204
|
+
return "#5fd7af";
|
|
205
|
+
case 80:
|
|
206
|
+
return "#5fd7d7";
|
|
207
|
+
case 81:
|
|
208
|
+
return "#5fd7ff";
|
|
209
|
+
case 82:
|
|
210
|
+
return "#5fff00";
|
|
211
|
+
case 83:
|
|
212
|
+
return "#5fff5f";
|
|
213
|
+
case 84:
|
|
214
|
+
return "#5fff87";
|
|
215
|
+
case 85:
|
|
216
|
+
return "#5fffaf";
|
|
217
|
+
case 86:
|
|
218
|
+
return "#5fffd7";
|
|
219
|
+
case 87:
|
|
220
|
+
return "#5fffff";
|
|
221
|
+
case 88:
|
|
222
|
+
return "#870000";
|
|
223
|
+
case 89:
|
|
224
|
+
return "#87005f";
|
|
225
|
+
case 90:
|
|
226
|
+
return "#870087";
|
|
227
|
+
case 91:
|
|
228
|
+
return "#8700af";
|
|
229
|
+
case 92:
|
|
230
|
+
return "#8700d7";
|
|
231
|
+
case 93:
|
|
232
|
+
return "#8700ff";
|
|
233
|
+
case 94:
|
|
234
|
+
return "#875f00";
|
|
235
|
+
case 95:
|
|
236
|
+
return "#875f5f";
|
|
237
|
+
case 96:
|
|
238
|
+
return "#875f87";
|
|
239
|
+
case 97:
|
|
240
|
+
return "#875faf";
|
|
241
|
+
case 98:
|
|
242
|
+
return "#875fd7";
|
|
243
|
+
case 99:
|
|
244
|
+
return "#875fff";
|
|
245
|
+
case 100:
|
|
246
|
+
return "#878700";
|
|
247
|
+
case 101:
|
|
248
|
+
return "#87875f";
|
|
249
|
+
case 102:
|
|
250
|
+
return "#878787";
|
|
251
|
+
case 103:
|
|
252
|
+
return "#8787af";
|
|
253
|
+
case 104:
|
|
254
|
+
return "#8787d7";
|
|
255
|
+
case 105:
|
|
256
|
+
return "#8787ff";
|
|
257
|
+
case 106:
|
|
258
|
+
return "#87af00";
|
|
259
|
+
case 107:
|
|
260
|
+
return "#87af5f";
|
|
261
|
+
case 108:
|
|
262
|
+
return "#87af87";
|
|
263
|
+
case 109:
|
|
264
|
+
return "#87afaf";
|
|
265
|
+
case 110:
|
|
266
|
+
return "#87afd7";
|
|
267
|
+
case 111:
|
|
268
|
+
return "#87afff";
|
|
269
|
+
case 112:
|
|
270
|
+
return "#87d700";
|
|
271
|
+
case 113:
|
|
272
|
+
return "#87d75f";
|
|
273
|
+
case 114:
|
|
274
|
+
return "#87d787";
|
|
275
|
+
case 115:
|
|
276
|
+
return "#87d7af";
|
|
277
|
+
case 116:
|
|
278
|
+
return "#87d7d7";
|
|
279
|
+
case 117:
|
|
280
|
+
return "#87d7ff";
|
|
281
|
+
case 118:
|
|
282
|
+
return "#87ff00";
|
|
283
|
+
case 119:
|
|
284
|
+
return "#87ff5f";
|
|
285
|
+
case 120:
|
|
286
|
+
return "#87ff87";
|
|
287
|
+
case 121:
|
|
288
|
+
return "#87ffaf";
|
|
289
|
+
case 122:
|
|
290
|
+
return "#87ffd7";
|
|
291
|
+
case 123:
|
|
292
|
+
return "#87ffff";
|
|
293
|
+
case 124:
|
|
294
|
+
return "#af0000";
|
|
295
|
+
case 125:
|
|
296
|
+
return "#af005f";
|
|
297
|
+
case 126:
|
|
298
|
+
return "#af0087";
|
|
299
|
+
case 127:
|
|
300
|
+
return "#af00af";
|
|
301
|
+
case 128:
|
|
302
|
+
return "#af00d7";
|
|
303
|
+
case 129:
|
|
304
|
+
return "#af00ff";
|
|
305
|
+
case 130:
|
|
306
|
+
return "#af5f00";
|
|
307
|
+
case 131:
|
|
308
|
+
return "#af5f5f";
|
|
309
|
+
case 132:
|
|
310
|
+
return "#af5f87";
|
|
311
|
+
case 133:
|
|
312
|
+
return "#af5faf";
|
|
313
|
+
case 134:
|
|
314
|
+
return "#af5fd7";
|
|
315
|
+
case 135:
|
|
316
|
+
return "#af5fff";
|
|
317
|
+
case 136:
|
|
318
|
+
return "#af8700";
|
|
319
|
+
case 137:
|
|
320
|
+
return "#af875f";
|
|
321
|
+
case 138:
|
|
322
|
+
return "#af8787";
|
|
323
|
+
case 139:
|
|
324
|
+
return "#af87af";
|
|
325
|
+
case 140:
|
|
326
|
+
return "#af87d7";
|
|
327
|
+
case 141:
|
|
328
|
+
return "#af87ff";
|
|
329
|
+
case 142:
|
|
330
|
+
return "#afaf00";
|
|
331
|
+
case 143:
|
|
332
|
+
return "#afaf5f";
|
|
333
|
+
case 144:
|
|
334
|
+
return "#afaf87";
|
|
335
|
+
case 145:
|
|
336
|
+
return "#afafaf";
|
|
337
|
+
case 146:
|
|
338
|
+
return "#afafd7";
|
|
339
|
+
case 147:
|
|
340
|
+
return "#afafff";
|
|
341
|
+
case 148:
|
|
342
|
+
return "#afd700";
|
|
343
|
+
case 149:
|
|
344
|
+
return "#afd75f";
|
|
345
|
+
case 150:
|
|
346
|
+
return "#afd787";
|
|
347
|
+
case 151:
|
|
348
|
+
return "#afd7af";
|
|
349
|
+
case 152:
|
|
350
|
+
return "#afd7d7";
|
|
351
|
+
case 153:
|
|
352
|
+
return "#afd7ff";
|
|
353
|
+
case 154:
|
|
354
|
+
return "#afff00";
|
|
355
|
+
case 155:
|
|
356
|
+
return "#afff5f";
|
|
357
|
+
case 156:
|
|
358
|
+
return "#afff87";
|
|
359
|
+
case 157:
|
|
360
|
+
return "#afffaf";
|
|
361
|
+
case 158:
|
|
362
|
+
return "#afffd7";
|
|
363
|
+
case 159:
|
|
364
|
+
return "#afffff";
|
|
365
|
+
case 160:
|
|
366
|
+
return "#d70000";
|
|
367
|
+
case 161:
|
|
368
|
+
return "#d7005f";
|
|
369
|
+
case 162:
|
|
370
|
+
return "#d70087";
|
|
371
|
+
case 163:
|
|
372
|
+
return "#d700af";
|
|
373
|
+
case 164:
|
|
374
|
+
return "#d700d7";
|
|
375
|
+
case 165:
|
|
376
|
+
return "#d700ff";
|
|
377
|
+
case 166:
|
|
378
|
+
return "#d75f00";
|
|
379
|
+
case 167:
|
|
380
|
+
return "#d75f5f";
|
|
381
|
+
case 168:
|
|
382
|
+
return "#d75f87";
|
|
383
|
+
case 169:
|
|
384
|
+
return "#d75faf";
|
|
385
|
+
case 170:
|
|
386
|
+
return "#d75fd7";
|
|
387
|
+
case 171:
|
|
388
|
+
return "#d75fff";
|
|
389
|
+
case 172:
|
|
390
|
+
return "#d78700";
|
|
391
|
+
case 173:
|
|
392
|
+
return "#d7875f";
|
|
393
|
+
case 174:
|
|
394
|
+
return "#d78787";
|
|
395
|
+
case 175:
|
|
396
|
+
return "#d787af";
|
|
397
|
+
case 176:
|
|
398
|
+
return "#d787d7";
|
|
399
|
+
case 177:
|
|
400
|
+
return "#d787ff";
|
|
401
|
+
case 178:
|
|
402
|
+
return "#d7af00";
|
|
403
|
+
case 179:
|
|
404
|
+
return "#d7af5f";
|
|
405
|
+
case 180:
|
|
406
|
+
return "#d7af87";
|
|
407
|
+
case 181:
|
|
408
|
+
return "#d7afaf";
|
|
409
|
+
case 182:
|
|
410
|
+
return "#d7afd7";
|
|
411
|
+
case 183:
|
|
412
|
+
return "#d7afff";
|
|
413
|
+
case 184:
|
|
414
|
+
return "#d7d700";
|
|
415
|
+
case 185:
|
|
416
|
+
return "#d7d75f";
|
|
417
|
+
case 186:
|
|
418
|
+
return "#d7d787";
|
|
419
|
+
case 187:
|
|
420
|
+
return "#d7d7af";
|
|
421
|
+
case 188:
|
|
422
|
+
return "#d7d7d7";
|
|
423
|
+
case 189:
|
|
424
|
+
return "#d7d7ff";
|
|
425
|
+
case 190:
|
|
426
|
+
return "#d7ff00";
|
|
427
|
+
case 191:
|
|
428
|
+
return "#d7ff5f";
|
|
429
|
+
case 192:
|
|
430
|
+
return "#d7ff87";
|
|
431
|
+
case 193:
|
|
432
|
+
return "#d7ffaf";
|
|
433
|
+
case 194:
|
|
434
|
+
return "#d7ffd7";
|
|
435
|
+
case 195:
|
|
436
|
+
return "#d7ffff";
|
|
437
|
+
case 9:
|
|
438
|
+
case 196:
|
|
439
|
+
return "#ff0000";
|
|
440
|
+
case 197:
|
|
441
|
+
return "#ff005f";
|
|
442
|
+
case 198:
|
|
443
|
+
return "#ff0087";
|
|
444
|
+
case 199:
|
|
445
|
+
return "#ff00af";
|
|
446
|
+
case 200:
|
|
447
|
+
return "#ff00d7";
|
|
448
|
+
case 13:
|
|
449
|
+
case 201:
|
|
450
|
+
return "#ff00ff";
|
|
451
|
+
case 202:
|
|
452
|
+
return "#ff5f00";
|
|
453
|
+
case 203:
|
|
454
|
+
return "#ff5f5f";
|
|
455
|
+
case 204:
|
|
456
|
+
return "#ff5f87";
|
|
457
|
+
case 205:
|
|
458
|
+
return "#ff5faf";
|
|
459
|
+
case 206:
|
|
460
|
+
return "#ff5fd7";
|
|
461
|
+
case 207:
|
|
462
|
+
return "#ff5fff";
|
|
463
|
+
case 208:
|
|
464
|
+
return "#ff8700";
|
|
465
|
+
case 209:
|
|
466
|
+
return "#ff875f";
|
|
467
|
+
case 210:
|
|
468
|
+
return "#ff8787";
|
|
469
|
+
case 211:
|
|
470
|
+
return "#ff87af";
|
|
471
|
+
case 212:
|
|
472
|
+
return "#ff87d7";
|
|
473
|
+
case 213:
|
|
474
|
+
return "#ff87ff";
|
|
475
|
+
case 214:
|
|
476
|
+
return "#ffaf00";
|
|
477
|
+
case 215:
|
|
478
|
+
return "#ffaf5f";
|
|
479
|
+
case 216:
|
|
480
|
+
return "#ffaf87";
|
|
481
|
+
case 217:
|
|
482
|
+
return "#ffafaf";
|
|
483
|
+
case 218:
|
|
484
|
+
return "#ffafd7";
|
|
485
|
+
case 219:
|
|
486
|
+
return "#ffafff";
|
|
487
|
+
case 220:
|
|
488
|
+
return "#ffd700";
|
|
489
|
+
case 221:
|
|
490
|
+
return "#ffd75f";
|
|
491
|
+
case 222:
|
|
492
|
+
return "#ffd787";
|
|
493
|
+
case 223:
|
|
494
|
+
return "#ffd7af";
|
|
495
|
+
case 224:
|
|
496
|
+
return "#ffd7d7";
|
|
497
|
+
case 225:
|
|
498
|
+
return "#ffd7ff";
|
|
499
|
+
case 11:
|
|
500
|
+
case 226:
|
|
501
|
+
return "#ffff00";
|
|
502
|
+
case 227:
|
|
503
|
+
return "#ffff5f";
|
|
504
|
+
case 228:
|
|
505
|
+
return "#ffff87";
|
|
506
|
+
case 229:
|
|
507
|
+
return "#ffffaf";
|
|
508
|
+
case 230:
|
|
509
|
+
return "#ffffd7";
|
|
510
|
+
case 15:
|
|
511
|
+
case 231:
|
|
512
|
+
return "#ffffff";
|
|
513
|
+
case 232:
|
|
514
|
+
return "#080808";
|
|
515
|
+
case 233:
|
|
516
|
+
return "#121212";
|
|
517
|
+
case 234:
|
|
518
|
+
return "#1c1c1c";
|
|
519
|
+
case 235:
|
|
520
|
+
return "#262626";
|
|
521
|
+
case 236:
|
|
522
|
+
return "#303030";
|
|
523
|
+
case 237:
|
|
524
|
+
return "#3a3a3a";
|
|
525
|
+
case 238:
|
|
526
|
+
return "#444444";
|
|
527
|
+
case 239:
|
|
528
|
+
return "#4e4e4e";
|
|
529
|
+
case 240:
|
|
530
|
+
return "#585858";
|
|
531
|
+
case 241:
|
|
532
|
+
return "#626262";
|
|
533
|
+
case 242:
|
|
534
|
+
return "#6c6c6c";
|
|
535
|
+
case 243:
|
|
536
|
+
return "#767676";
|
|
537
|
+
case 8:
|
|
538
|
+
case 244:
|
|
539
|
+
return "#808080";
|
|
540
|
+
case 245:
|
|
541
|
+
return "#8a8a8a";
|
|
542
|
+
case 246:
|
|
543
|
+
return "#949494";
|
|
544
|
+
case 247:
|
|
545
|
+
return "#9e9e9e";
|
|
546
|
+
case 248:
|
|
547
|
+
return "#a8a8a8";
|
|
548
|
+
case 249:
|
|
549
|
+
return "#b2b2b2";
|
|
550
|
+
case 250:
|
|
551
|
+
return "#bcbcbc";
|
|
552
|
+
case 251:
|
|
553
|
+
return "#c6c6c6";
|
|
554
|
+
case 252:
|
|
555
|
+
return "#d0d0d0";
|
|
556
|
+
case 253:
|
|
557
|
+
return "#dadada";
|
|
558
|
+
case 254:
|
|
559
|
+
return "#e4e4e4";
|
|
560
|
+
case 255:
|
|
561
|
+
return "#eeeeee";
|
|
562
|
+
default:
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
__name(heightBitColors, "heightBitColors");
|
|
567
|
+
|
|
56
568
|
// node_modules/@rescript/core/src/Core__List.res.mjs
|
|
57
569
|
function add(xs, x) {
|
|
58
570
|
return {
|
|
@@ -299,6 +811,39 @@ function int_of_cp(c) {
|
|
|
299
811
|
return c - 48 | 0;
|
|
300
812
|
}
|
|
301
813
|
__name(int_of_cp, "int_of_cp");
|
|
814
|
+
function int_of_3bcd(d3, d2, d1) {
|
|
815
|
+
return (Math.imul(d3 - 48 | 0, 100) + Math.imul(d2 - 48 | 0, 10) | 0) + (d1 - 48 | 0) | 0;
|
|
816
|
+
}
|
|
817
|
+
__name(int_of_3bcd, "int_of_3bcd");
|
|
818
|
+
function get(colorMode, colorValue) {
|
|
819
|
+
return flatMap(heightBitColors(colorValue), function(color) {
|
|
820
|
+
var match = colorMode - 48 | 0;
|
|
821
|
+
if (match !== 3) {
|
|
822
|
+
if (match !== 4) {
|
|
823
|
+
console.log("Unknown 256color code:", colorMode, colorValue);
|
|
824
|
+
return;
|
|
825
|
+
} else {
|
|
826
|
+
return {
|
|
827
|
+
TAG: "Style",
|
|
828
|
+
_0: {
|
|
829
|
+
background: color
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
} else {
|
|
834
|
+
return {
|
|
835
|
+
TAG: "Style",
|
|
836
|
+
_0: {
|
|
837
|
+
color
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
__name(get, "get");
|
|
844
|
+
var Color256 = {
|
|
845
|
+
get
|
|
846
|
+
};
|
|
302
847
|
function getColorStyle(colorMode, colorValue) {
|
|
303
848
|
switch (colorMode) {
|
|
304
849
|
case 3:
|
|
@@ -346,14 +891,14 @@ function getColorStyleCss(color) {
|
|
|
346
891
|
}
|
|
347
892
|
}
|
|
348
893
|
__name(getColorStyleCss, "getColorStyleCss");
|
|
349
|
-
function get(colorMode, colorValue) {
|
|
894
|
+
function get$1(colorMode, colorValue) {
|
|
350
895
|
return flatMap(getColorStyle(colorMode - 48 | 0, colorValue - 48 | 0), getColorStyleCss);
|
|
351
896
|
}
|
|
352
|
-
__name(get, "get");
|
|
897
|
+
__name(get$1, "get$1");
|
|
353
898
|
var ColorCss = {
|
|
354
899
|
getColorStyle,
|
|
355
900
|
getColorStyleCss,
|
|
356
|
-
get
|
|
901
|
+
get: get$1
|
|
357
902
|
};
|
|
358
903
|
function getFontStyle(fontMode) {
|
|
359
904
|
switch (fontMode) {
|
|
@@ -398,17 +943,17 @@ function getFontStyleCss(font) {
|
|
|
398
943
|
}
|
|
399
944
|
}
|
|
400
945
|
__name(getFontStyleCss, "getFontStyleCss");
|
|
401
|
-
function get$
|
|
946
|
+
function get$2(fontMode) {
|
|
402
947
|
return flatMap(getFontStyle(fontMode - 48 | 0), getFontStyleCss);
|
|
403
948
|
}
|
|
404
|
-
__name(get$
|
|
949
|
+
__name(get$2, "get$2");
|
|
405
950
|
var FontCss = {
|
|
406
951
|
getFontStyle,
|
|
407
952
|
getFontStyleCss,
|
|
408
|
-
get: get$
|
|
953
|
+
get: get$2
|
|
409
954
|
};
|
|
410
955
|
var linkRe = new RegExp("^(http(s)?:\\/\\/[^\\)>\\s\x1B]+)");
|
|
411
|
-
function get$
|
|
956
|
+
function get$3(txt) {
|
|
412
957
|
return getOr(flatMap(nullable_to_opt(linkRe.exec(txt)), function(res) {
|
|
413
958
|
return flatMap(res[0], function(url) {
|
|
414
959
|
return [
|
|
@@ -424,10 +969,10 @@ function get$2(txt) {
|
|
|
424
969
|
void 0
|
|
425
970
|
]);
|
|
426
971
|
}
|
|
427
|
-
__name(get$
|
|
972
|
+
__name(get$3, "get$3");
|
|
428
973
|
var HttpLink = {
|
|
429
974
|
linkRe,
|
|
430
|
-
get: get$
|
|
975
|
+
get: get$3
|
|
431
976
|
};
|
|
432
977
|
function parse(txt, pos) {
|
|
433
978
|
var match = codePointAt(pos, txt);
|
|
@@ -446,7 +991,7 @@ function parse(txt, pos) {
|
|
|
446
991
|
void 0
|
|
447
992
|
];
|
|
448
993
|
} else {
|
|
449
|
-
return get$
|
|
994
|
+
return get$3(slice(pos, 512, txt));
|
|
450
995
|
}
|
|
451
996
|
}
|
|
452
997
|
exit = 1;
|
|
@@ -528,6 +1073,11 @@ function parse(txt, pos) {
|
|
|
528
1073
|
];
|
|
529
1074
|
}
|
|
530
1075
|
switch (len) {
|
|
1076
|
+
case 0:
|
|
1077
|
+
return [
|
|
1078
|
+
1,
|
|
1079
|
+
void 0
|
|
1080
|
+
];
|
|
531
1081
|
case 1:
|
|
532
1082
|
var match$1 = codePoints[0];
|
|
533
1083
|
if (match$1 !== 91) {
|
|
@@ -553,7 +1103,7 @@ function parse(txt, pos) {
|
|
|
553
1103
|
if (style$2 !== 48) {
|
|
554
1104
|
return [
|
|
555
1105
|
length2,
|
|
556
|
-
flatMap(get$
|
|
1106
|
+
flatMap(get$2(style$2), function(style2) {
|
|
557
1107
|
return {
|
|
558
1108
|
TAG: "Style",
|
|
559
1109
|
_0: style2
|
|
@@ -680,13 +1230,7 @@ function parse(txt, pos) {
|
|
|
680
1230
|
style = style$4;
|
|
681
1231
|
exit$1 = 3;
|
|
682
1232
|
break;
|
|
683
|
-
case 0:
|
|
684
1233
|
case 7:
|
|
685
|
-
return [
|
|
686
|
-
1,
|
|
687
|
-
void 0
|
|
688
|
-
];
|
|
689
|
-
case 8:
|
|
690
1234
|
var match$12 = codePoints[0];
|
|
691
1235
|
if (match$12 !== 91) {
|
|
692
1236
|
return [
|
|
@@ -694,88 +1238,185 @@ function parse(txt, pos) {
|
|
|
694
1238
|
void 0
|
|
695
1239
|
];
|
|
696
1240
|
}
|
|
697
|
-
var
|
|
1241
|
+
var fgbg = codePoints[1];
|
|
698
1242
|
var match$13 = codePoints[2];
|
|
699
|
-
if (match$13 !==
|
|
1243
|
+
if (match$13 !== 56) {
|
|
700
1244
|
return [
|
|
701
1245
|
1,
|
|
702
1246
|
void 0
|
|
703
1247
|
];
|
|
704
1248
|
}
|
|
705
|
-
var
|
|
706
|
-
var cv1$1 = codePoints[4];
|
|
707
|
-
var match$14 = codePoints[5];
|
|
1249
|
+
var match$14 = codePoints[3];
|
|
708
1250
|
if (match$14 !== 59) {
|
|
709
1251
|
return [
|
|
710
1252
|
1,
|
|
711
1253
|
void 0
|
|
712
1254
|
];
|
|
713
1255
|
}
|
|
714
|
-
var
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
1256
|
+
var match$15 = codePoints[4];
|
|
1257
|
+
if (match$15 !== 53) {
|
|
1258
|
+
return [
|
|
1259
|
+
1,
|
|
1260
|
+
void 0
|
|
1261
|
+
];
|
|
1262
|
+
}
|
|
1263
|
+
var match$16 = codePoints[5];
|
|
1264
|
+
if (match$16 !== 59) {
|
|
1265
|
+
return [
|
|
1266
|
+
1,
|
|
1267
|
+
void 0
|
|
1268
|
+
];
|
|
1269
|
+
}
|
|
1270
|
+
var c1 = codePoints[6];
|
|
1271
|
+
return [
|
|
1272
|
+
length2,
|
|
1273
|
+
get(fgbg, c1 - 48 | 0)
|
|
1274
|
+
];
|
|
1275
|
+
case 8:
|
|
1276
|
+
var match$17 = codePoints[0];
|
|
1277
|
+
if (match$17 !== 91) {
|
|
1278
|
+
return [
|
|
1279
|
+
1,
|
|
1280
|
+
void 0
|
|
1281
|
+
];
|
|
1282
|
+
}
|
|
1283
|
+
var fgbg$1 = codePoints[1];
|
|
1284
|
+
var match$18 = codePoints[2];
|
|
1285
|
+
if (match$18 !== 56) {
|
|
1286
|
+
if (match$18 !== 59) {
|
|
1287
|
+
return [
|
|
1288
|
+
1,
|
|
1289
|
+
void 0
|
|
1290
|
+
];
|
|
1291
|
+
}
|
|
1292
|
+
var cm1$1 = codePoints[3];
|
|
1293
|
+
var cv1$1 = codePoints[4];
|
|
1294
|
+
var match$19 = codePoints[5];
|
|
1295
|
+
if (match$19 !== 59) {
|
|
1296
|
+
return [
|
|
1297
|
+
1,
|
|
1298
|
+
void 0
|
|
1299
|
+
];
|
|
1300
|
+
}
|
|
1301
|
+
var cm2$1 = codePoints[6];
|
|
1302
|
+
var cv2$1 = codePoints[7];
|
|
1303
|
+
style$1 = fgbg$1;
|
|
1304
|
+
cm1 = cm1$1;
|
|
1305
|
+
cv1 = cv1$1;
|
|
1306
|
+
cm2 = cm2$1;
|
|
1307
|
+
cv2 = cv2$1;
|
|
1308
|
+
xs$1 = codePoints;
|
|
1309
|
+
exit$1 = 4;
|
|
1310
|
+
} else {
|
|
1311
|
+
var match$20 = codePoints[3];
|
|
1312
|
+
if (match$20 !== 59) {
|
|
1313
|
+
return [
|
|
1314
|
+
1,
|
|
1315
|
+
void 0
|
|
1316
|
+
];
|
|
1317
|
+
}
|
|
1318
|
+
var match$21 = codePoints[4];
|
|
1319
|
+
if (match$21 !== 53) {
|
|
1320
|
+
return [
|
|
1321
|
+
1,
|
|
1322
|
+
void 0
|
|
1323
|
+
];
|
|
1324
|
+
}
|
|
1325
|
+
var match$22 = codePoints[5];
|
|
1326
|
+
if (match$22 !== 59) {
|
|
1327
|
+
return [
|
|
1328
|
+
1,
|
|
1329
|
+
void 0
|
|
1330
|
+
];
|
|
1331
|
+
}
|
|
1332
|
+
var c2 = codePoints[6];
|
|
1333
|
+
var c1$1 = codePoints[7];
|
|
1334
|
+
return [
|
|
1335
|
+
length2,
|
|
1336
|
+
get(fgbg$1, int_of_3bcd(0, c2, c1$1))
|
|
1337
|
+
];
|
|
1338
|
+
}
|
|
723
1339
|
break;
|
|
724
1340
|
case 9:
|
|
725
|
-
var match$
|
|
726
|
-
if (match$
|
|
1341
|
+
var match$23 = codePoints[0];
|
|
1342
|
+
if (match$23 !== 91) {
|
|
727
1343
|
return [
|
|
728
1344
|
1,
|
|
729
1345
|
void 0
|
|
730
1346
|
];
|
|
731
1347
|
}
|
|
732
|
-
var
|
|
1348
|
+
var fgbg$2 = codePoints[1];
|
|
733
1349
|
var exit$3 = 0;
|
|
734
|
-
|
|
735
|
-
|
|
1350
|
+
var match$24 = codePoints[2];
|
|
1351
|
+
if (match$24 !== 56) {
|
|
1352
|
+
if (match$24 !== 59) {
|
|
1353
|
+
exit$3 = 5;
|
|
1354
|
+
} else {
|
|
1355
|
+
var cm1$2 = codePoints[3];
|
|
1356
|
+
var cv1$2 = codePoints[4];
|
|
1357
|
+
var match$25 = codePoints[5];
|
|
1358
|
+
if (match$25 !== 59) {
|
|
1359
|
+
exit$3 = 5;
|
|
1360
|
+
} else {
|
|
1361
|
+
var match$26 = codePoints[6];
|
|
1362
|
+
if (match$26 !== 49) {
|
|
1363
|
+
exit$3 = 5;
|
|
1364
|
+
} else {
|
|
1365
|
+
var cm2$2 = codePoints[7];
|
|
1366
|
+
var cv2$2 = codePoints[8];
|
|
1367
|
+
style$1 = fgbg$2;
|
|
1368
|
+
cm1 = cm1$2;
|
|
1369
|
+
cv1 = cv1$2;
|
|
1370
|
+
cm2 = cm2$2;
|
|
1371
|
+
cv2 = cv2$2;
|
|
1372
|
+
xs$1 = codePoints;
|
|
1373
|
+
exit$1 = 4;
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
736
1377
|
} else {
|
|
737
|
-
var
|
|
738
|
-
|
|
739
|
-
if (match$16 !== 59) {
|
|
1378
|
+
var match$27 = codePoints[3];
|
|
1379
|
+
if (match$27 !== 59) {
|
|
740
1380
|
exit$3 = 5;
|
|
741
1381
|
} else {
|
|
742
|
-
var
|
|
743
|
-
|
|
744
|
-
var match$17 = codePoints[6];
|
|
745
|
-
if (match$17 !== 59) {
|
|
1382
|
+
var match$28 = codePoints[4];
|
|
1383
|
+
if (match$28 !== 53) {
|
|
746
1384
|
exit$3 = 5;
|
|
747
1385
|
} else {
|
|
748
|
-
var
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
1386
|
+
var match$29 = codePoints[5];
|
|
1387
|
+
if (match$29 !== 59) {
|
|
1388
|
+
exit$3 = 5;
|
|
1389
|
+
} else {
|
|
1390
|
+
var c3 = codePoints[6];
|
|
1391
|
+
var c2$1 = codePoints[7];
|
|
1392
|
+
var c1$2 = codePoints[8];
|
|
1393
|
+
return [
|
|
1394
|
+
length2,
|
|
1395
|
+
get(fgbg$2, int_of_3bcd(c3, c2$1, c1$2))
|
|
1396
|
+
];
|
|
1397
|
+
}
|
|
757
1398
|
}
|
|
758
1399
|
}
|
|
759
1400
|
}
|
|
760
1401
|
if (exit$3 === 5) {
|
|
761
|
-
|
|
762
|
-
if (match$18 !== 59) {
|
|
1402
|
+
if (fgbg$2 !== 48) {
|
|
763
1403
|
return [
|
|
764
1404
|
1,
|
|
765
1405
|
void 0
|
|
766
1406
|
];
|
|
767
1407
|
}
|
|
768
|
-
var
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
if (match$19 !== 59) {
|
|
1408
|
+
var style$5 = codePoints[2];
|
|
1409
|
+
var match$30 = codePoints[3];
|
|
1410
|
+
if (match$30 !== 59) {
|
|
772
1411
|
return [
|
|
773
1412
|
1,
|
|
774
1413
|
void 0
|
|
775
1414
|
];
|
|
776
1415
|
}
|
|
777
|
-
var
|
|
778
|
-
|
|
1416
|
+
var cm1$3 = codePoints[4];
|
|
1417
|
+
var cv1$3 = codePoints[5];
|
|
1418
|
+
var match$31 = codePoints[6];
|
|
1419
|
+
if (match$31 !== 59) {
|
|
779
1420
|
return [
|
|
780
1421
|
1,
|
|
781
1422
|
void 0
|
|
@@ -783,7 +1424,7 @@ function parse(txt, pos) {
|
|
|
783
1424
|
}
|
|
784
1425
|
var cm2$3 = codePoints[7];
|
|
785
1426
|
var cv2$3 = codePoints[8];
|
|
786
|
-
style$1 = style$
|
|
1427
|
+
style$1 = style$5;
|
|
787
1428
|
cm1 = cm1$3;
|
|
788
1429
|
cv1 = cv1$3;
|
|
789
1430
|
cm2 = cm2$3;
|
|
@@ -793,23 +1434,23 @@ function parse(txt, pos) {
|
|
|
793
1434
|
}
|
|
794
1435
|
break;
|
|
795
1436
|
case 10:
|
|
796
|
-
var match$
|
|
797
|
-
if (match$
|
|
1437
|
+
var match$32 = codePoints[0];
|
|
1438
|
+
if (match$32 !== 91) {
|
|
798
1439
|
return [
|
|
799
1440
|
1,
|
|
800
1441
|
void 0
|
|
801
1442
|
];
|
|
802
1443
|
}
|
|
803
|
-
var match$
|
|
804
|
-
if (match$
|
|
1444
|
+
var match$33 = codePoints[1];
|
|
1445
|
+
if (match$33 !== 48) {
|
|
805
1446
|
return [
|
|
806
1447
|
1,
|
|
807
1448
|
void 0
|
|
808
1449
|
];
|
|
809
1450
|
}
|
|
810
|
-
var style$
|
|
811
|
-
var match$
|
|
812
|
-
if (match$
|
|
1451
|
+
var style$6 = codePoints[2];
|
|
1452
|
+
var match$34 = codePoints[3];
|
|
1453
|
+
if (match$34 !== 59) {
|
|
813
1454
|
return [
|
|
814
1455
|
1,
|
|
815
1456
|
void 0
|
|
@@ -817,15 +1458,15 @@ function parse(txt, pos) {
|
|
|
817
1458
|
}
|
|
818
1459
|
var cm1$4 = codePoints[4];
|
|
819
1460
|
var cv1$4 = codePoints[5];
|
|
820
|
-
var match$
|
|
821
|
-
if (match$
|
|
1461
|
+
var match$35 = codePoints[6];
|
|
1462
|
+
if (match$35 !== 59) {
|
|
822
1463
|
return [
|
|
823
1464
|
1,
|
|
824
1465
|
void 0
|
|
825
1466
|
];
|
|
826
1467
|
}
|
|
827
|
-
var match$
|
|
828
|
-
if (match$
|
|
1468
|
+
var match$36 = codePoints[7];
|
|
1469
|
+
if (match$36 !== 49) {
|
|
829
1470
|
return [
|
|
830
1471
|
1,
|
|
831
1472
|
void 0
|
|
@@ -833,7 +1474,7 @@ function parse(txt, pos) {
|
|
|
833
1474
|
}
|
|
834
1475
|
var cm2$4 = codePoints[8];
|
|
835
1476
|
var cv2$4 = codePoints[9];
|
|
836
|
-
style$1 = style$
|
|
1477
|
+
style$1 = style$6;
|
|
837
1478
|
cm1 = cm1$4;
|
|
838
1479
|
cv1 = cv1$4;
|
|
839
1480
|
cm2 = cm2$4;
|
|
@@ -846,7 +1487,7 @@ function parse(txt, pos) {
|
|
|
846
1487
|
case 2:
|
|
847
1488
|
return [
|
|
848
1489
|
length2,
|
|
849
|
-
flatMap(get(colorMode, colorValue + (xs.length === 4 ? 10 : 0) | 0), function(colorCss) {
|
|
1490
|
+
flatMap(get$1(colorMode, colorValue + (xs.length === 4 ? 10 : 0) | 0), function(colorCss) {
|
|
850
1491
|
return {
|
|
851
1492
|
TAG: "Style",
|
|
852
1493
|
_0: colorCss
|
|
@@ -856,8 +1497,8 @@ function parse(txt, pos) {
|
|
|
856
1497
|
case 3:
|
|
857
1498
|
return [
|
|
858
1499
|
length2,
|
|
859
|
-
flatMap(get(colorMode$1, colorValue$1), function(colorCss) {
|
|
860
|
-
var fontCss = get$
|
|
1500
|
+
flatMap(get$1(colorMode$1, colorValue$1), function(colorCss) {
|
|
1501
|
+
var fontCss = get$2(style);
|
|
861
1502
|
if (fontCss !== void 0) {
|
|
862
1503
|
return {
|
|
863
1504
|
TAG: "Style",
|
|
@@ -874,10 +1515,10 @@ function parse(txt, pos) {
|
|
|
874
1515
|
case 4:
|
|
875
1516
|
return [
|
|
876
1517
|
length2,
|
|
877
|
-
flatMap(get(cm1, cv1), function(colorCss1) {
|
|
878
|
-
return flatMap(get(cm2, cv2 + (xs$1.length === 9 ? 10 : 0) | 0), function(colorCss2) {
|
|
1518
|
+
flatMap(get$1(cm1, cv1), function(colorCss1) {
|
|
1519
|
+
return flatMap(get$1(cm2, cv2 + (xs$1.length === 9 ? 10 : 0) | 0), function(colorCss2) {
|
|
879
1520
|
var css = Object.assign({}, colorCss1, colorCss2);
|
|
880
|
-
var fontCss = get$
|
|
1521
|
+
var fontCss = get$2(style$1);
|
|
881
1522
|
if (fontCss !== void 0) {
|
|
882
1523
|
return {
|
|
883
1524
|
TAG: "Style",
|
|
@@ -904,6 +1545,8 @@ var AnsiCode = {
|
|
|
904
1545
|
addStyle,
|
|
905
1546
|
addDecoration,
|
|
906
1547
|
int_of_cp,
|
|
1548
|
+
int_of_3bcd,
|
|
1549
|
+
Color256,
|
|
907
1550
|
ColorCss,
|
|
908
1551
|
FontCss,
|
|
909
1552
|
HttpLink,
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// From https://hexdocs.pm/color_palette/ansi_color_codes.html#content
|
|
2
|
+
let heightBitColors = (code: int): option<string> =>
|
|
3
|
+
switch (code) {
|
|
4
|
+
| 0 => "#000000"->Some
|
|
5
|
+
| 1 => "#800000"->Some
|
|
6
|
+
| 2 => "#008000"->Some
|
|
7
|
+
| 3 => "#808000"->Some
|
|
8
|
+
| 4 => "#000080"->Some
|
|
9
|
+
| 5 => "#800080"->Some
|
|
10
|
+
| 6 => "#008080"->Some
|
|
11
|
+
| 7 => "#c0c0c0"->Some
|
|
12
|
+
| 8 => "#808080"->Some
|
|
13
|
+
| 9 => "#ff0000"->Some
|
|
14
|
+
| 10 => "#00ff00"->Some
|
|
15
|
+
| 11 => "#ffff00"->Some
|
|
16
|
+
| 12 => "#0000ff"->Some
|
|
17
|
+
| 13 => "#ff00ff"->Some
|
|
18
|
+
| 14 => "#00ffff"->Some
|
|
19
|
+
| 15 => "#ffffff"->Some
|
|
20
|
+
| 16 => "#000000"->Some
|
|
21
|
+
| 17 => "#00005f"->Some
|
|
22
|
+
| 18 => "#000087"->Some
|
|
23
|
+
| 19 => "#0000af"->Some
|
|
24
|
+
| 20 => "#0000d7"->Some
|
|
25
|
+
| 21 => "#0000ff"->Some
|
|
26
|
+
| 22 => "#005f00"->Some
|
|
27
|
+
| 23 => "#005f5f"->Some
|
|
28
|
+
| 24 => "#005f87"->Some
|
|
29
|
+
| 25 => "#005faf"->Some
|
|
30
|
+
| 26 => "#005fd7"->Some
|
|
31
|
+
| 27 => "#005fff"->Some
|
|
32
|
+
| 28 => "#008700"->Some
|
|
33
|
+
| 29 => "#00875f"->Some
|
|
34
|
+
| 30 => "#008787"->Some
|
|
35
|
+
| 31 => "#0087af"->Some
|
|
36
|
+
| 32 => "#0087d7"->Some
|
|
37
|
+
| 33 => "#0087ff"->Some
|
|
38
|
+
| 34 => "#00af00"->Some
|
|
39
|
+
| 35 => "#00af5f"->Some
|
|
40
|
+
| 36 => "#00af87"->Some
|
|
41
|
+
| 37 => "#00afaf"->Some
|
|
42
|
+
| 38 => "#00afd7"->Some
|
|
43
|
+
| 39 => "#00afff"->Some
|
|
44
|
+
| 40 => "#00d700"->Some
|
|
45
|
+
| 41 => "#00d75f"->Some
|
|
46
|
+
| 42 => "#00d787"->Some
|
|
47
|
+
| 43 => "#00d7af"->Some
|
|
48
|
+
| 44 => "#00d7d7"->Some
|
|
49
|
+
| 45 => "#00d7ff"->Some
|
|
50
|
+
| 46 => "#00ff00"->Some
|
|
51
|
+
| 47 => "#00ff5f"->Some
|
|
52
|
+
| 48 => "#00ff87"->Some
|
|
53
|
+
| 49 => "#00ffaf"->Some
|
|
54
|
+
| 50 => "#00ffd7"->Some
|
|
55
|
+
| 51 => "#00ffff"->Some
|
|
56
|
+
| 52 => "#5f0000"->Some
|
|
57
|
+
| 53 => "#5f005f"->Some
|
|
58
|
+
| 54 => "#5f0087"->Some
|
|
59
|
+
| 55 => "#5f00af"->Some
|
|
60
|
+
| 56 => "#5f00d7"->Some
|
|
61
|
+
| 57 => "#5f00ff"->Some
|
|
62
|
+
| 58 => "#5f5f00"->Some
|
|
63
|
+
| 59 => "#5f5f5f"->Some
|
|
64
|
+
| 60 => "#5f5f87"->Some
|
|
65
|
+
| 61 => "#5f5faf"->Some
|
|
66
|
+
| 62 => "#5f5fd7"->Some
|
|
67
|
+
| 63 => "#5f5fff"->Some
|
|
68
|
+
| 64 => "#5f8700"->Some
|
|
69
|
+
| 65 => "#5f875f"->Some
|
|
70
|
+
| 66 => "#5f8787"->Some
|
|
71
|
+
| 67 => "#5f87af"->Some
|
|
72
|
+
| 68 => "#5f87d7"->Some
|
|
73
|
+
| 69 => "#5f87ff"->Some
|
|
74
|
+
| 70 => "#5faf00"->Some
|
|
75
|
+
| 71 => "#5faf5f"->Some
|
|
76
|
+
| 72 => "#5faf87"->Some
|
|
77
|
+
| 73 => "#5fafaf"->Some
|
|
78
|
+
| 74 => "#5fafd7"->Some
|
|
79
|
+
| 75 => "#5fafff"->Some
|
|
80
|
+
| 76 => "#5fd700"->Some
|
|
81
|
+
| 77 => "#5fd75f"->Some
|
|
82
|
+
| 78 => "#5fd787"->Some
|
|
83
|
+
| 79 => "#5fd7af"->Some
|
|
84
|
+
| 80 => "#5fd7d7"->Some
|
|
85
|
+
| 81 => "#5fd7ff"->Some
|
|
86
|
+
| 82 => "#5fff00"->Some
|
|
87
|
+
| 83 => "#5fff5f"->Some
|
|
88
|
+
| 84 => "#5fff87"->Some
|
|
89
|
+
| 85 => "#5fffaf"->Some
|
|
90
|
+
| 86 => "#5fffd7"->Some
|
|
91
|
+
| 87 => "#5fffff"->Some
|
|
92
|
+
| 88 => "#870000"->Some
|
|
93
|
+
| 89 => "#87005f"->Some
|
|
94
|
+
| 90 => "#870087"->Some
|
|
95
|
+
| 91 => "#8700af"->Some
|
|
96
|
+
| 92 => "#8700d7"->Some
|
|
97
|
+
| 93 => "#8700ff"->Some
|
|
98
|
+
| 94 => "#875f00"->Some
|
|
99
|
+
| 95 => "#875f5f"->Some
|
|
100
|
+
| 96 => "#875f87"->Some
|
|
101
|
+
| 97 => "#875faf"->Some
|
|
102
|
+
| 98 => "#875fd7"->Some
|
|
103
|
+
| 99 => "#875fff"->Some
|
|
104
|
+
| 100 => "#878700"->Some
|
|
105
|
+
| 101 => "#87875f"->Some
|
|
106
|
+
| 102 => "#878787"->Some
|
|
107
|
+
| 103 => "#8787af"->Some
|
|
108
|
+
| 104 => "#8787d7"->Some
|
|
109
|
+
| 105 => "#8787ff"->Some
|
|
110
|
+
| 106 => "#87af00"->Some
|
|
111
|
+
| 107 => "#87af5f"->Some
|
|
112
|
+
| 108 => "#87af87"->Some
|
|
113
|
+
| 109 => "#87afaf"->Some
|
|
114
|
+
| 110 => "#87afd7"->Some
|
|
115
|
+
| 111 => "#87afff"->Some
|
|
116
|
+
| 112 => "#87d700"->Some
|
|
117
|
+
| 113 => "#87d75f"->Some
|
|
118
|
+
| 114 => "#87d787"->Some
|
|
119
|
+
| 115 => "#87d7af"->Some
|
|
120
|
+
| 116 => "#87d7d7"->Some
|
|
121
|
+
| 117 => "#87d7ff"->Some
|
|
122
|
+
| 118 => "#87ff00"->Some
|
|
123
|
+
| 119 => "#87ff5f"->Some
|
|
124
|
+
| 120 => "#87ff87"->Some
|
|
125
|
+
| 121 => "#87ffaf"->Some
|
|
126
|
+
| 122 => "#87ffd7"->Some
|
|
127
|
+
| 123 => "#87ffff"->Some
|
|
128
|
+
| 124 => "#af0000"->Some
|
|
129
|
+
| 125 => "#af005f"->Some
|
|
130
|
+
| 126 => "#af0087"->Some
|
|
131
|
+
| 127 => "#af00af"->Some
|
|
132
|
+
| 128 => "#af00d7"->Some
|
|
133
|
+
| 129 => "#af00ff"->Some
|
|
134
|
+
| 130 => "#af5f00"->Some
|
|
135
|
+
| 131 => "#af5f5f"->Some
|
|
136
|
+
| 132 => "#af5f87"->Some
|
|
137
|
+
| 133 => "#af5faf"->Some
|
|
138
|
+
| 134 => "#af5fd7"->Some
|
|
139
|
+
| 135 => "#af5fff"->Some
|
|
140
|
+
| 136 => "#af8700"->Some
|
|
141
|
+
| 137 => "#af875f"->Some
|
|
142
|
+
| 138 => "#af8787"->Some
|
|
143
|
+
| 139 => "#af87af"->Some
|
|
144
|
+
| 140 => "#af87d7"->Some
|
|
145
|
+
| 141 => "#af87ff"->Some
|
|
146
|
+
| 142 => "#afaf00"->Some
|
|
147
|
+
| 143 => "#afaf5f"->Some
|
|
148
|
+
| 144 => "#afaf87"->Some
|
|
149
|
+
| 145 => "#afafaf"->Some
|
|
150
|
+
| 146 => "#afafd7"->Some
|
|
151
|
+
| 147 => "#afafff"->Some
|
|
152
|
+
| 148 => "#afd700"->Some
|
|
153
|
+
| 149 => "#afd75f"->Some
|
|
154
|
+
| 150 => "#afd787"->Some
|
|
155
|
+
| 151 => "#afd7af"->Some
|
|
156
|
+
| 152 => "#afd7d7"->Some
|
|
157
|
+
| 153 => "#afd7ff"->Some
|
|
158
|
+
| 154 => "#afff00"->Some
|
|
159
|
+
| 155 => "#afff5f"->Some
|
|
160
|
+
| 156 => "#afff87"->Some
|
|
161
|
+
| 157 => "#afffaf"->Some
|
|
162
|
+
| 158 => "#afffd7"->Some
|
|
163
|
+
| 159 => "#afffff"->Some
|
|
164
|
+
| 160 => "#d70000"->Some
|
|
165
|
+
| 161 => "#d7005f"->Some
|
|
166
|
+
| 162 => "#d70087"->Some
|
|
167
|
+
| 163 => "#d700af"->Some
|
|
168
|
+
| 164 => "#d700d7"->Some
|
|
169
|
+
| 165 => "#d700ff"->Some
|
|
170
|
+
| 166 => "#d75f00"->Some
|
|
171
|
+
| 167 => "#d75f5f"->Some
|
|
172
|
+
| 168 => "#d75f87"->Some
|
|
173
|
+
| 169 => "#d75faf"->Some
|
|
174
|
+
| 170 => "#d75fd7"->Some
|
|
175
|
+
| 171 => "#d75fff"->Some
|
|
176
|
+
| 172 => "#d78700"->Some
|
|
177
|
+
| 173 => "#d7875f"->Some
|
|
178
|
+
| 174 => "#d78787"->Some
|
|
179
|
+
| 175 => "#d787af"->Some
|
|
180
|
+
| 176 => "#d787d7"->Some
|
|
181
|
+
| 177 => "#d787ff"->Some
|
|
182
|
+
| 178 => "#d7af00"->Some
|
|
183
|
+
| 179 => "#d7af5f"->Some
|
|
184
|
+
| 180 => "#d7af87"->Some
|
|
185
|
+
| 181 => "#d7afaf"->Some
|
|
186
|
+
| 182 => "#d7afd7"->Some
|
|
187
|
+
| 183 => "#d7afff"->Some
|
|
188
|
+
| 184 => "#d7d700"->Some
|
|
189
|
+
| 185 => "#d7d75f"->Some
|
|
190
|
+
| 186 => "#d7d787"->Some
|
|
191
|
+
| 187 => "#d7d7af"->Some
|
|
192
|
+
| 188 => "#d7d7d7"->Some
|
|
193
|
+
| 189 => "#d7d7ff"->Some
|
|
194
|
+
| 190 => "#d7ff00"->Some
|
|
195
|
+
| 191 => "#d7ff5f"->Some
|
|
196
|
+
| 192 => "#d7ff87"->Some
|
|
197
|
+
| 193 => "#d7ffaf"->Some
|
|
198
|
+
| 194 => "#d7ffd7"->Some
|
|
199
|
+
| 195 => "#d7ffff"->Some
|
|
200
|
+
| 196 => "#ff0000"->Some
|
|
201
|
+
| 197 => "#ff005f"->Some
|
|
202
|
+
| 198 => "#ff0087"->Some
|
|
203
|
+
| 199 => "#ff00af"->Some
|
|
204
|
+
| 200 => "#ff00d7"->Some
|
|
205
|
+
| 201 => "#ff00ff"->Some
|
|
206
|
+
| 202 => "#ff5f00"->Some
|
|
207
|
+
| 203 => "#ff5f5f"->Some
|
|
208
|
+
| 204 => "#ff5f87"->Some
|
|
209
|
+
| 205 => "#ff5faf"->Some
|
|
210
|
+
| 206 => "#ff5fd7"->Some
|
|
211
|
+
| 207 => "#ff5fff"->Some
|
|
212
|
+
| 208 => "#ff8700"->Some
|
|
213
|
+
| 209 => "#ff875f"->Some
|
|
214
|
+
| 210 => "#ff8787"->Some
|
|
215
|
+
| 211 => "#ff87af"->Some
|
|
216
|
+
| 212 => "#ff87d7"->Some
|
|
217
|
+
| 213 => "#ff87ff"->Some
|
|
218
|
+
| 214 => "#ffaf00"->Some
|
|
219
|
+
| 215 => "#ffaf5f"->Some
|
|
220
|
+
| 216 => "#ffaf87"->Some
|
|
221
|
+
| 217 => "#ffafaf"->Some
|
|
222
|
+
| 218 => "#ffafd7"->Some
|
|
223
|
+
| 219 => "#ffafff"->Some
|
|
224
|
+
| 220 => "#ffd700"->Some
|
|
225
|
+
| 221 => "#ffd75f"->Some
|
|
226
|
+
| 222 => "#ffd787"->Some
|
|
227
|
+
| 223 => "#ffd7af"->Some
|
|
228
|
+
| 224 => "#ffd7d7"->Some
|
|
229
|
+
| 225 => "#ffd7ff"->Some
|
|
230
|
+
| 226 => "#ffff00"->Some
|
|
231
|
+
| 227 => "#ffff5f"->Some
|
|
232
|
+
| 228 => "#ffff87"->Some
|
|
233
|
+
| 229 => "#ffffaf"->Some
|
|
234
|
+
| 230 => "#ffffd7"->Some
|
|
235
|
+
| 231 => "#ffffff"->Some
|
|
236
|
+
| 232 => "#080808"->Some
|
|
237
|
+
| 233 => "#121212"->Some
|
|
238
|
+
| 234 => "#1c1c1c"->Some
|
|
239
|
+
| 235 => "#262626"->Some
|
|
240
|
+
| 236 => "#303030"->Some
|
|
241
|
+
| 237 => "#3a3a3a"->Some
|
|
242
|
+
| 238 => "#444444"->Some
|
|
243
|
+
| 239 => "#4e4e4e"->Some
|
|
244
|
+
| 240 => "#585858"->Some
|
|
245
|
+
| 241 => "#626262"->Some
|
|
246
|
+
| 242 => "#6c6c6c"->Some
|
|
247
|
+
| 243 => "#767676"->Some
|
|
248
|
+
| 244 => "#808080"->Some
|
|
249
|
+
| 245 => "#8a8a8a"->Some
|
|
250
|
+
| 246 => "#949494"->Some
|
|
251
|
+
| 247 => "#9e9e9e"->Some
|
|
252
|
+
| 248 => "#a8a8a8"->Some
|
|
253
|
+
| 249 => "#b2b2b2"->Some
|
|
254
|
+
| 250 => "#bcbcbc"->Some
|
|
255
|
+
| 251 => "#c6c6c6"->Some
|
|
256
|
+
| 252 => "#d0d0d0"->Some
|
|
257
|
+
| 253 => "#dadada"->Some
|
|
258
|
+
| 254 => "#e4e4e4"->Some
|
|
259
|
+
| 255 => "#eeeeee"->Some
|
|
260
|
+
| _ => None
|
|
261
|
+
}
|