Fork of a colorful wallpaper generator: https://github.com/Deleh/huepaper
Go to file
Renovate 9929f80e6c
All checks were successful
Tests / test (3.10) (pull_request) Successful in 1m30s
Tests / test (3.11) (pull_request) Successful in 1m30s
Tests / test (3.8) (pull_request) Successful in 1m29s
Tests / test (3.9) (pull_request) Successful in 1m29s
Update dependency pylint to v3
2024-01-21 22:14:11 +02:00
.gitea/workflows Changed branch name to master 2023-08-10 14:09:51 +02:00
.vscode Image mode won't be attempted to be set 2024-01-21 17:05:48 +01:00
images update logo 2020-05-09 12:33:24 +02:00
requirements Update dependency pylint to v3 2024-01-21 22:14:11 +02:00
src/huepaper RGB mode fixed 2024-01-21 17:28:57 +01:00
tests Fixed -p and improved coverage 2023-08-10 14:31:33 +02:00
.gitignore add gitignore 2021-03-11 18:50:50 +01:00
.renovaterc Add .renovaterc 2024-01-21 17:34:57 +02:00
LICENSE update license 2021-07-15 11:55:37 +02:00
pyproject.toml Update to 0.0.4 2023-08-10 14:02:29 +02:00
README.md Fixed -p and improved coverage 2023-08-10 14:31:33 +02:00
tox.ini Update to 0.0.4 2023-08-10 14:02:29 +02:00

huepaper - a colorful wallpaper generator

Logo

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 below. For more examples visit the Mastodon huebot.

Installation

pip install --index-url https://git.end-play.xyz/api/packages/profitroll/pypi/simple/ huepaper

Usage

usage: huepaper [-h] [--width WIDTH] [--height HEIGHT] [-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.

optional arguments:
  -h, --help            show this help message and exit
  --width WIDTH         width of the image (default: 1920)
  --height HEIGHT       height of the image (default: 1080)
  -c COLOR, --color COLOR
                        base color from which the huepaper is generated (default: random color)
  -o OUTPUT, --output OUTPUT
                        filepath where the huepaper will be saved
  -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 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)

...or as a Python module

from huepaper import generate

image = generate(width=500, height=500, hue_max=1.0, lum_min=0.3, lum_max=0.6, sat_min=0.8, sat_max=1.0)

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. Valid color expressions are e.g. #F5F5DC, #0f0, ffff80 and red. Make sure, that colors beginning with a # are encapsulated in quotes. All supported color names can be seen 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

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.

Huepaper 1

huepaper

Huepaper 1

huepaper -c lightgreen

Huepaper 3

huepaper -c "#ff7f50" -lb 0.05

Huepaper 4

huepaper -hue 1.0 -lmin 0.3 -lmax 0.6 -smin 0.8 -smax 1.0

Huepaper 5

huepaper -hue 0.3 -lmin 0.5 -lmax 0.5 -l 0.5 -p 64x36

Huepaper 6

huepaper -l -lb -ld -e nixos.png