Compare commits
10 commits
835da97333
...
048805bf04
| Author | SHA1 | Date | |
|---|---|---|---|
| 048805bf04 | |||
| 72ad0d4cd0 | |||
| ab7f6def08 | |||
| 20407dfc78 | |||
| bb641ed2ec | |||
| c04a4b4357 | |||
| 1fe736523e | |||
| dcfdab8944 | |||
| 32d83f1820 | |||
| d6e04bae8e |
5 changed files with 37 additions and 57 deletions
73
README.org
73
README.org
|
|
@ -1,7 +1,4 @@
|
|||
* huepaper - a colorful wallpaper generator
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: huepaper
|
||||
:END:
|
||||
|
||||
#+caption: Logo
|
||||
[[./images/logo.png]]
|
||||
|
|
@ -9,56 +6,38 @@
|
|||
*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.
|
||||
For more examples visit the Mastodon [[https://botsin.space/@huebot][huebot]].
|
||||
|
||||
** Installation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: installation
|
||||
:END:
|
||||
|
||||
*** Nix
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: nix
|
||||
:END:
|
||||
|
||||
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:
|
||||
If you have a recent version of the [[https://nixos.org/][Nix package manager]] installed and Flakes are enabled, run huepaper like this:
|
||||
|
||||
#+begin_example sh
|
||||
nix run github:Deleh/huepaper
|
||||
#+end_example
|
||||
: $ nix run github:Deleh/huepaper
|
||||
|
||||
Parameters can be passed by appending a double-dash:
|
||||
|
||||
#+begin_example sh
|
||||
nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue
|
||||
#+end_example
|
||||
: $ nix run github:Deleh/huepaper -- -hue 0.5 --color lightblue
|
||||
|
||||
Global installation can be done by including this flake in your flaked NixOS configuration as always :)
|
||||
|
||||
*** Legacy
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: legacy
|
||||
:END:
|
||||
|
||||
Execute the following steps to run huepaper:
|
||||
|
||||
#+begin_example sh
|
||||
pip install -r requirements.txt
|
||||
./huepaper.py
|
||||
: $ pip install -r requirements.txt
|
||||
: $ ./huepaper.py
|
||||
#+end_example
|
||||
|
||||
To install it in your Python environment run:
|
||||
|
||||
#+begin_example sh
|
||||
python setup.py install
|
||||
#+end_example
|
||||
: $ python setup.py install
|
||||
|
||||
** Usage
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: usage
|
||||
:END:
|
||||
|
||||
#+begin_example text
|
||||
#+begin_example
|
||||
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]
|
||||
|
||||
Create wallpapers based on color hues.
|
||||
|
|
@ -77,18 +56,18 @@
|
|||
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]
|
||||
-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)
|
||||
-smin SMIN minimum saturation for colors in range [0, 1] (default: 0.2)
|
||||
-smax SMAX maximum saturation 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)
|
||||
#+end_example
|
||||
|
||||
All image operations are called in order of the help file. E.g. pixelate (=-P=) is called after adding lines (=-l=).
|
||||
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.
|
||||
|
|
@ -102,9 +81,9 @@
|
|||
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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: examples
|
||||
:END:
|
||||
:properties:
|
||||
:custom_id: examples
|
||||
:end:
|
||||
|
||||
Please note, that every huepaper call generates a new random image.
|
||||
You will never get the same huepaper twice.
|
||||
|
|
@ -114,39 +93,39 @@
|
|||
#+caption: Huepaper 1
|
||||
[[./images/huepaper_1.png]]
|
||||
|
||||
=huepaper=
|
||||
: $ huepaper
|
||||
|
||||
--------------
|
||||
-----
|
||||
|
||||
#+caption: Huepaper 1
|
||||
[[./images/huepaper_2.png]]
|
||||
|
||||
=huepaper -c lightgreen=
|
||||
: $ huepaper -c lightgreen
|
||||
|
||||
--------------
|
||||
-----
|
||||
|
||||
#+caption: Huepaper 3
|
||||
[[./images/huepaper_3.png]]
|
||||
|
||||
=huepaper -c "#ff7f50" -lb 0.05=
|
||||
: $ huepaper -c "#ff7f50" -lb 0.05
|
||||
|
||||
--------------
|
||||
-----
|
||||
|
||||
#+caption: Huepaper 4
|
||||
[[./images/huepaper_4.png]]
|
||||
|
||||
=huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0=
|
||||
: $ huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0
|
||||
|
||||
--------------
|
||||
-----
|
||||
|
||||
#+caption: Huepaper 5
|
||||
[[./images/huepaper_5.png]]
|
||||
|
||||
=huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36=
|
||||
: $ huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -P 64x36
|
||||
|
||||
--------------
|
||||
-----
|
||||
|
||||
#+caption: Huepaper 6
|
||||
[[./images/huepaper_6.png]]
|
||||
|
||||
=huepaper -l -lb -ld -e nixos.png=
|
||||
: $ huepaper -l -lb -ld -e nixos.png
|
||||
|
|
|
|||
12
flake.lock
generated
12
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1637014545,
|
||||
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1637155076,
|
||||
"narHash": "sha256-26ZPNiuzlsnXpt55Q44+yzXvp385aNAfevzVEKbrU5Q=",
|
||||
"lastModified": 1676300157,
|
||||
"narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "715f63411952c86c8f57ab9e3e3cb866a015b5f2",
|
||||
"rev": "545c7a31e5dedea4a6d372712a18e00ce097d462",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ if __name__ == "__main__":
|
|||
help="include one to three dark random lines with given opacity in range [0, 1] (default: 0.1)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-P",
|
||||
"-p",
|
||||
"--pixelate",
|
||||
nargs="?",
|
||||
const="16x9",
|
||||
|
|
@ -126,13 +126,13 @@ if __name__ == "__main__":
|
|||
"-smin",
|
||||
default=0.2,
|
||||
type=float,
|
||||
help="minimum satisfaction for colors in range [0, 1] (default: 0.2)",
|
||||
help="minimum saturation for colors in range [0, 1] (default: 0.2)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-smax",
|
||||
default=1.0,
|
||||
type=float,
|
||||
help="maximum satisfaction for colors in range [0, 1] (default: 1.0)",
|
||||
help="maximum saturation for colors in range [0, 1] (default: 1.0)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-lmin",
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
colour
|
||||
numpy
|
||||
pillow
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -17,5 +17,5 @@ setup(
|
|||
license="LICENSE",
|
||||
description="A colorful wallpaper generator",
|
||||
long_description=open("README.org").read(),
|
||||
install_requires=["colour", "pillow"],
|
||||
install_requires=["colour", "numpy", "pillow"],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue