2020-04-25 20:46:17 +00:00
# @themer/wallpaper-trianglify
2018-01-18 02:27:39 +00:00
A wallpaper template for [themer ](https://github.com/mjswensen/themer ). It uses the popular [trianglify ](https://github.com/qrohlf/trianglify ) library to generate wallpapers from your color set.
2020-04-24 12:56:56 +00:00
Here's a preview using [themer's default color set ](https://github.com/mjswensen/themer/tree/master/cli/packages/colors-default ):
2018-01-18 02:27:39 +00:00
2020-04-15 12:44:01 +00:00
![dark desktop ](https://cdn.jsdelivr.net/gh/mjswensen/themer@399430ac7b58691dc436761b1a03614898df92ba/cli/packages/themer-wallpaper-trianglify/assets/desktop-dark.svg )
2018-01-18 02:27:39 +00:00
## Installation & usage
Install this module wherever you have `themer` installed:
2020-04-25 20:46:17 +00:00
npm install @themer/wallpaper -trianglify
2018-01-18 02:27:39 +00:00
2020-04-25 20:46:17 +00:00
Then pass `@themer/wallpaper-trianglify` as a `-t` (`--template`) arg to `themer` :
2018-01-18 02:27:39 +00:00
2020-04-25 20:46:17 +00:00
themer -c my-colors.js -t @themer/wallpaper -trianglify -o gen
2018-01-18 02:27:39 +00:00
2020-04-25 20:46:17 +00:00
`@themer/wallpaper-trianglify` will generate SVG wallpapers to the output directory (`gen/` in this example).
2018-01-18 02:27:39 +00:00
2020-03-20 13:13:23 +00:00
The generated files will be listed in `<output dir>/README.md` .
2018-01-18 02:27:39 +00:00
### Default resolutions
2020-04-25 20:46:17 +00:00
By default, `@themer/wallpaper-trianglify` will output wallpapers at the following sizes:
2018-01-18 02:27:39 +00:00
* 2880 by 1800 (desktop)
* 750 by 1334 (device)
### Custom resolutions
2020-04-25 20:46:17 +00:00
`@themer/wallpaper-trianglify` adds the following argument to `themer` :
2018-01-18 02:27:39 +00:00
--themer-wallpaper-trianglify-size
to which you would pass `<width>x<height>` . For example, to forego the default resolutions and generate wallpapers in two resolutions, 1024 by 768 and 320 by 960:
2020-04-25 20:46:17 +00:00
themer -c my-colors.js -t @themer/wallpaper -trianglify --themer-wallpaper-trianglify-size 1024x768 --themer-wallpaper-trianglify-size 320x960 -o gen
2018-01-18 02:27:39 +00:00
### Variance
2020-04-25 20:46:17 +00:00
`@themer/wallpaper-trianglify` also adds an option to `themer` for configuring the randomness of the triangles generated by trianglify:
2018-01-18 02:27:39 +00:00
2018-01-18 02:31:43 +00:00
--themer-wallpaper-trianglify-variance < variance >
2018-01-18 02:27:39 +00:00
Accepts a float between `0` and `1` , defaults to `0.75` (see [trianglify docs ](https://github.com/qrohlf/trianglify#variance )). Like `--themer-wallpaper-trianglify-size` , this option can be provided multiple times—`themer` will generate a complete set of wallpapers for each value passed.