huepaper/README.org

153 lines
5.2 KiB
Org Mode
Raw Normal View History

2021-07-14 18:25:14 +03:00
* huepaper - a colorful wallpaper generator
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: huepaper
:END:
2021-07-14 18:25:14 +03:00
#+caption: Logo
[[./images/logo.png]]
*huepaper* creates wallpapers based on color hues. Bring a little color in your life by randomness, because every huepaper is truly unique.
You can find [[#examples][examples]] below.
** Installation
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: installation
:END:
2021-07-14 18:25:14 +03:00
2021-07-15 10:43:28 +03:00
*** Nix
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: nix
:END:
2021-07-14 18:25:14 +03:00
2021-07-15 10:43:28 +03:00
This project is a [[https://nixos.wiki/wiki/Flakes][Nix Flake]].
If you have a recent version of the [[https://nixos.org/][Nix package manager]] installed and flakes are enabled, run huepaper like this:
2021-07-14 18:25:14 +03:00
2021-07-15 10:43:28 +03:00
#+begin_example sh
2021-07-15 13:14:22 +03:00
nix run github:Deleh/huepaper
2021-07-15 10:43:28 +03:00
#+end_example
2021-07-14 18:25:14 +03:00
2021-07-15 13:14:22 +03:00
Parameters can be passed by appending a double-dash:
#+begin_example sh
nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue
#+end_example
2021-07-15 10:58:00 +03:00
Global installation can be done by including this flake in your flaked NixOS configuration as always :)
2021-07-15 10:43:28 +03:00
*** Legacy
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: legacy
:END:
2021-07-14 18:25:14 +03:00
2021-07-15 10:43:28 +03:00
Execute the following steps to run huepaper:
#+begin_example sh
pip install -r requirements.txt
2021-07-15 13:14:22 +03:00
./huepaper.py
2021-07-15 10:43:28 +03:00
#+end_example
To install it in your Python environment run:
#+begin_example sh
python setup.py install
#+end_example
2021-07-14 18:25:14 +03:00
** Usage
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: usage
:END:
2021-07-14 18:25:14 +03:00
2021-07-15 10:43:28 +03:00
#+begin_example text
2021-07-15 13:14:22 +03:00
usage: huepaper [-h] [-s SIZE] [-c COLOR] [-np] [-o OUTPUT] [-l [LINES]] [-lb [LINES_BRIGHT]] [-ld [LINES_DARK]] [-P [PIXELATE]] [-e EMBLEM] [-hue HUE] [-smin SMIN] [-smax SMAX] [-lmin LMIN] [-lmax LMAX]
2021-07-14 18:25:14 +03:00
Create wallpapers based on color hues.
optional arguments:
-h, --help show this help message and exit
-s SIZE, --size SIZE size of huepaper in the form WIDTHxHEIGHT (default: 1920x1080)
-c COLOR, --color COLOR
2021-07-15 13:14:22 +03:00
base color from which the huepaper is generated (default: random color)
-np, --no-preview don't preview the huepaper
2021-07-14 18:25:14 +03:00
-o OUTPUT, --output OUTPUT
2021-07-15 13:14:22 +03:00
filepath where the huepaper will be saved
2021-07-14 18:25:14 +03:00
-l [LINES], --lines [LINES]
include one to three random lines in base color with given opacity in range [0, 1] (default: 0.3)
-lb [LINES_BRIGHT], --lines_bright [LINES_BRIGHT]
include one to three bright random lines with given opacity in range [0, 1] (default: 0.1)
-ld [LINES_DARK], --lines_dark [LINES_DARK]
include one to three dark random lines with given opacity in range [0, 1] (default: 0.1)
-P [PIXELATE], --pixelate [PIXELATE]
pixelate image with WIDTHxHEIGHT (default: 16x9)
-e EMBLEM, --emblem EMBLEM
emblem to add in the center of the huepaper
-hue HUE maximum hue to differ from given color in range [0, 1] (default: 0.1)
-smin SMIN minimum satisfaction for colors in range [0, 1] (default: 0.2)
-smax SMAX maximum satisfaction for colors in range [0, 1] (default: 1.0)
-lmin LMIN minimum luminance for colors in range [0, 1] (default: 0.2)
-lmax LMAX maximum luminance for colors in range [0, 1] (default: 0.9)
2021-07-15 10:43:28 +03:00
#+end_example
2021-07-14 18:25:14 +03:00
All image operations are called in order of the help file. E.g. pixelate (=-P=) is called after adding lines (=-l=).
If you set the color via =-c= it is not guaranteed, that it is included in the huepaper.
Colors, similar to the given one are chosen.
You can specify how far the colors differ in the hue range with the =-hue= parameter.
2021-07-15 10:43:28 +03:00
Valid color expressions are e.g. =#F5F5DC=, =#0f0=, =ffff80= and =red=.
2021-07-15 10:58:00 +03:00
Make sure, that colors beginning with a =#= are encapsulated in quotes.
2021-07-14 18:25:14 +03:00
All supported color names can be seen [[https://www.w3schools.com/colors/colors_names.asp][here]].
If you use the =-e= argument to specify an emblem, make sure it has the correct size.
It is not scaled or stretched, just placed in the center of the image.
If you want an offset, e.g. put it in the left bottom corner, provide an emblem file with the size of the huepaper, transparent background and your emblem in the bottom left corner.
** Examples
2021-07-16 03:57:23 +03:00
:PROPERTIES:
:CUSTOM_ID: examples
:END:
2021-07-14 18:25:14 +03:00
Please note, that every huepaper call generates a new random image.
You will never get the same huepaper twice.
You may like some and dislike others.
Fiddle around with the options to find a result, you are happy with.
#+caption: Huepaper 1
[[./images/huepaper_1.png]]
2021-07-15 13:14:22 +03:00
=huepaper=
2021-07-14 18:25:14 +03:00
--------------
#+caption: Huepaper 1
[[./images/huepaper_2.png]]
2021-07-15 13:14:22 +03:00
=huepaper -c lightgreen=
2021-07-14 18:25:14 +03:00
--------------
#+caption: Huepaper 3
[[./images/huepaper_3.png]]
2021-07-15 13:14:22 +03:00
=huepaper -c "#ff7f50" -lb 0.05=
2021-07-14 18:25:14 +03:00
--------------
#+caption: Huepaper 4
[[./images/huepaper_4.png]]
2021-07-15 13:14:22 +03:00
=huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0=
2021-07-14 18:25:14 +03:00
--------------
#+caption: Huepaper 5
[[./images/huepaper_5.png]]
2021-07-15 13:14:22 +03:00
=huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36=
2021-07-14 18:25:14 +03:00
--------------
#+caption: Huepaper 6
[[./images/huepaper_6.png]]
2021-07-15 13:14:22 +03:00
=huepaper -l -lb -ld -e nixos.png=