wallust 3.5.1

Generate a 16 color scheme based on an image.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "PrettyConfig",
  "description": "This is mainly to generate a pretty and accurate config JSON SCHEMA",
  "type": "object",
  "properties": {
    "alpha": {
      "description": "Optional alpha value",
      "type": [
        "integer",
        "null"
      ],
      "format": "uint8",
      "maximum": 255,
      "minimum": 0
    },
    "backend": {
      "description": "Which backend to use, see backends.rs",
      "anyOf": [
        {
          "$ref": "#/$defs/Backend"
        },
        {
          "type": "null"
        }
      ]
    },
    "check_contrast": {
      "description": "This flags ensures good contrast between images, by doing some w3m calculations.\nHowever it isn't required and should only be turn on when you notice bad contrast between many images.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "color_space": {
      "description": "Which colorspace to use, see colorspaces.rs",
      "anyOf": [
        {
          "$ref": "#/$defs/ColorSpace"
        },
        {
          "type": "null"
        }
      ]
    },
    "env_vars": {
      "description": "Enables the use of enviromental variables in the targets template paths",
      "type": [
        "boolean",
        "null"
      ]
    },
    "fallback_generator": {
      "description": "How to 'generate' colors when there aren't enough colors to create the `palette`.\nThis appears as \"Artificially generating colors..\" in cli",
      "anyOf": [
        {
          "$ref": "#/$defs/FallbackGenerator"
        },
        {
          "type": "null"
        }
      ]
    },
    "hooks": {
      "description": "Entry for 'hooks', which summon external commands that are used along side wallust",
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      }
    },
    "no_hooks": {
      "description": "Ignores all hooks defined in the config file, if any.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "palette": {
      "description": "Which palette to use, see palettes.rs",
      "anyOf": [
        {
          "$ref": "#/$defs/Palette"
        },
        {
          "type": "null"
        }
      ]
    },
    "saturation": {
      "description": "Maybe the user requires more vivid colors",
      "type": [
        "integer",
        "null"
      ],
      "format": "uint8",
      "maximum": 255,
      "minimum": 0
    },
    "templates": {
      "description": "The [templates] header, here you can define multiple templates",
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "$ref": "#/$defs/Fields"
      }
    },
    "threshold": {
      "description": "What threshold to use to differentiate colors, if not defined, wallust automatically looks\nfor the best fit",
      "type": [
        "integer",
        "null"
      ],
      "format": "uint8",
      "default": null,
      "maximum": 255,
      "minimum": 0
    }
  },
  "$defs": {
    "Backend": {
      "description": "This indicates what 'parser' method to use, defined in the config file. Corresponds to the\nmodules inside this module",
      "oneOf": [
        {
          "description": "Read and return the whole image pixels (more precision, slower)",
          "type": "string",
          "const": "full"
        },
        {
          "description": "Resizes the image before parsing, mantaining it's aspect ratio",
          "type": "string",
          "const": "resized"
        },
        {
          "description": "Uses image magick `convert` to generate the colors, like pywal",
          "type": "string",
          "const": "wal"
        },
        {
          "description": "Faster algo hardcoded to 512x512 (no ratio respected)",
          "type": "string",
          "const": "thumb"
        },
        {
          "description": "A much faster resize algo that uses SIMD. For some reason it fails on some images where\n`resized` doesn't, for this reason it doesn't *replace* but rather it's a new option.",
          "type": "string",
          "const": "fastresize"
        },
        {
          "description": "Kmeans is an algo that divides and picks pixels all around the image, giving a more\ndiverse look.",
          "type": "string",
          "const": "kmeans"
        }
      ]
    },
    "ColorSpace": {
      "description": "Corresponds to the modules inside this module and `color_space` parameter in the config file.",
      "oneOf": [
        {
          "description": "Uses Cie L*a*b color space",
          "type": "string",
          "const": "lab"
        },
        {
          "description": "Variant of `lab` that mixes the colors gathered, if not enough colors it fallbacks to usual\nlab (not recommended in small images)",
          "type": "string",
          "const": "labmixed"
        },
        {
          "description": "CIE Lch, you can understand this color space like LAB but with chrome and hue added.\nCould help when sorting.",
          "type": "string",
          "const": "lch"
        },
        {
          "description": "CIE Lch variant that mixed on every similar color.",
          "type": "string",
          "const": "lchmixed"
        },
        {
          "description": "Differentiates colors by visual **salience**. Salience refers to how much something (a\ncolor) pops out from a context (the background). Currently based on CIE Lch.",
          "type": "string",
          "const": "salience"
        },
        {
          "description": "Variant of Lch which preserves 8 colors: black, red, green, yellow, blue, magenta, cyan and gray.\nThis works best with 'darkansi' palette, allowing a constant color order.",
          "type": "string",
          "const": "lchansi"
        }
      ]
    },
    "FallbackGenerator": {
      "description": "The FallbackGenerator are methods only activated when the colors aren't sufficient for creating\na scheme palette, so these methods make variants of the already gathered colros to create a\nscheme.",
      "oneOf": [
        {
          "description": "uses [`interpolate`]",
          "type": "string",
          "const": "interpolate"
        },
        {
          "description": "uses [`complementary`]",
          "type": "string",
          "const": "complementary"
        }
      ]
    },
    "Fields": {
      "description": "An entry within the config file, toml table\nref: <https://toml.io/en/v1.0.0#array-of-tables>",
      "type": "object",
      "properties": {
        "max_depth": {
          "description": "If 'src' is a directory, 'dst' SHOULD also be one.\nThis flag allows for 'src', when a dir, to be templated recursively\nIf 'src' is a file, this has no effect.",
          "type": [
            "integer",
            "null"
          ],
          "format": "uint8",
          "maximum": 255,
          "minimum": 0
        },
        "pywal": {
          "description": "Allows pywal template spec compatibility (disabled by default)",
          "type": [
            "boolean",
            "null"
          ]
        },
        "target": {
          "description": "Where to write the template",
          "type": "string"
        },
        "template": {
          "description": "A file inside `~/.config/wallust/`, which is used for templating",
          "type": "string"
        }
      },
      "required": [
        "template",
        "target"
      ]
    },
    "Palette": {
      "description": "Corresponds to the modules inside this module and `palette` parameter in the config file.",
      "oneOf": [
        {
          "description": "8 dark colors, dark background and light contrast",
          "type": "string",
          "const": "dark"
        },
        {
          "description": "Same as `dark` but uses the 16 colors trick",
          "type": "string",
          "const": "dark16"
        },
        {
          "description": "This is a `dark` variant that changes all colors to it's complementary counterpart, giving\nthe feeling of a 'new palette' but that still makes sense with the image provided.",
          "type": "string",
          "const": "darkcomp"
        },
        {
          "description": "16 variation of the dark complementary variant",
          "type": "string",
          "const": "darkcomp16"
        },
        {
          "description": "This is not a 'dark' variant, is a new palette that is meant to work with `lchansi`\ncolorspace, which will maintain 'tty' like color order and only adjusting the colors\nacording to the theme. A possible solution for LS_COLORS and the like. Should workout with\nother colorspace, but the result may not be optimal.",
          "type": "string",
          "const": "ansidark"
        },
        {
          "description": "The ansidark palette with 16 color variation.",
          "type": "string",
          "const": "ansidark16"
        },
        {
          "description": "Same as `dark` with hard hue colors",
          "type": "string",
          "const": "harddark"
        },
        {
          "description": "Harddark with 16 color variation",
          "type": "string",
          "const": "harddark16"
        },
        {
          "description": "complementary colors variation of harddark scheme",
          "type": "string",
          "const": "harddarkcomp"
        },
        {
          "description": "complementary colors variation of harddark scheme",
          "type": "string",
          "const": "harddarkcomp16"
        },
        {
          "description": "Dark with ascending salience, sampling the highest (default) gathered salient colors.",
          "type": "string",
          "const": "saliencedark"
        },
        {
          "description": "SalienceDark but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencedark16"
        },
        {
          "description": "SalienceDark, but sampling the median gathered salient colors. Use if you find all the\ncolors screaming your attention (all very salient) and you want to tone it down.",
          "type": "string",
          "const": "saliencedarkbalanced"
        },
        {
          "description": "SalienceDarkBalanced but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencedarkbalanced16"
        },
        {
          "description": "SalienceDark, but sampling distributed across gathered salient colors. Use if you find all\ncolors screaming your attention (all very salient) and you want to spread it out.",
          "type": "string",
          "const": "saliencedarkdistributed"
        },
        {
          "description": "SalienceDarkDistributed but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencedarkdistributed16"
        },
        {
          "description": "SalienceDark, but sampling the lowest gathered salient colors. Use if you find all colors\nscreaming your attention (all very salient) and you *really* want to tone it down.",
          "type": "string",
          "const": "saliencedarklow"
        },
        {
          "description": "SalienceDarkLow but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencedarklow16"
        },
        {
          "description": "Light bg, dark fg",
          "type": "string",
          "const": "light"
        },
        {
          "description": "Same as `light` but uses the 16 color trick",
          "type": "string",
          "const": "light16"
        },
        {
          "description": "complementary colors variation of light",
          "type": "string",
          "const": "lightcomp"
        },
        {
          "description": "complementary colors variation of light with the 16 color variation",
          "type": "string",
          "const": "lightcomp16"
        },
        {
          "description": "Variant of softlight, uses the lightest colors and a dark background (could be\ninterpreted as `dark` inversed)",
          "type": "string",
          "const": "softdark"
        },
        {
          "description": "softdark with 16 color variation",
          "type": "string",
          "const": "softdark16"
        },
        {
          "description": "complementary variation for softdark",
          "type": "string",
          "const": "softdarkcomp"
        },
        {
          "description": "complementary variation for softdark with the 16 color variation",
          "type": "string",
          "const": "softdarkcomp16"
        },
        {
          "description": "Light with soft pastel colors, counterpart of `harddark`",
          "type": "string",
          "const": "softlight"
        },
        {
          "description": "softlight with 16 color variation",
          "type": "string",
          "const": "softlight16"
        },
        {
          "description": "softlight with complementary colors",
          "type": "string",
          "const": "softlightcomp"
        },
        {
          "description": "softlight with complementary colors with 16 colors",
          "type": "string",
          "const": "softlightcomp16"
        },
        {
          "description": "Light with ascending salience, sampling the highest (default) gathered salient colors.",
          "type": "string",
          "const": "saliencelight"
        },
        {
          "description": "SalienceLight but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencelight16"
        },
        {
          "description": "SalienceLight, but sampling the median gathered salient colors. Use if you find all the\ncolors screaming your attention (all very salient) and you want to tone it down.",
          "type": "string",
          "const": "saliencelightbalanced"
        },
        {
          "description": "SalienceLightBalanced but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencelightbalanced16"
        },
        {
          "description": "SalienceLight, but sampling distributed across gathered salient colors. Use if you find all\ncolors screaming your attention (all very salient) and you want to spread it out.",
          "type": "string",
          "const": "saliencelightdistributed"
        },
        {
          "description": "SalienceLightDistributed but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencelightdistributed16"
        },
        {
          "description": "SalienceLight, but sampling the lowest gathered salient colors. Use if you find all colors\nscreaming your attention (all very salient) and you *really* want to tone it down.",
          "type": "string",
          "const": "saliencelightlow"
        },
        {
          "description": "SalienceLightLow but uses the 16 colors trick.",
          "type": "string",
          "const": "saliencelightlow16"
        }
      ]
    }
  }
}