A Minimalist wallpaper generator
Project description
ColorWallpaper
A Minimalist wallpaper generator
Get the latest release
Generates wallpapers such as:
Requirements
Usage
Direct generation: python ColorWallpaper.py --option[s]
Options:
-h
/--help
- Display help and exit
File options
-o
/--output
PATH
- Used to specify image output path.
- Default:
out.png
-y
/--yes
- Forces overwrite of
--output
- Forces overwrite of
Color options
-c
/--color
COLOR
- Used to specify Background color. Also accepts
random
which picks random named color. - Default:
random
- Used to specify Background color. Also accepts
-c2
/--color2
COLOR
- Used to specify text color. Also accepts
inverted
which is the inverse of--color
. - Default:
inverted
- Used to specify text color. Also accepts
-d
/--display
NAME
- Overrides the display name of the
--color
. Empty string disables the name row.
- Overrides the display name of the
--min-contrast
CONTRAST
- Min contrast of
--color
and--color2
, if--color2
isinverted
. Will raise if this can not be satisfied. - Default:
1
- Min contrast of
--overlay-color
COLOR
- Used to specify color of potential overlay, like icons or text.
--overlay-contrast
CONTRAST
- Min contrast of --color and --overlay-color. Will raise if this can not be satisfied.
- Default:
1
Display options
-r
/--resolution
RESOLUTION
- Used to specify image resolution.
- Default:
1920x1080
.
-s
/--scale
SCALE
- The size of the highlight (128px) will be multiplied by this.
- Default:
3
-f
/--formats
[FORMAT
...]- Declares the order and formats to display
- Default:
empty HEX rgb
Argument formats
COLOR
#Hex
: Three or six hexadecimal digits optionally starting with#
.R,G,B
: Three comma separated numbers in range 0-255.- Valid name of a color.
CONTRAST
- A float in range 1-21.
RESOLUTION
- Two integers greater or equal to 150, separated by
x
or:
.
- Two integers greater or equal to 150, separated by
FORMAT
- Self explanatory:
hex
,rgb
,hsv
,hsl
,cmyk
empty
: Empty row.#hex
:hex
, but starting with#
#HEX
,HEX
: Likehex
, but uppercase
- Self explanatory:
Examples
The above image
python -m color_wallpaper --color black --output https://raw.githubusercontent.com/BranislavBajuzik/ColorWallpaper/master/example.png --formats empty HEX rgb --resolution 960x540 --scale 2
Dynamic Android wallpaper
Changes the wallpaper to a new color every time the screen is turned on. Tested on OnePlus 6T.
Install Tasker, Termux, and Termux:Tasker
In Termux run:
# Give Termux access to internal storage
termux-setup-storage
# Get Python
pkg upgrade
pkg install python python-dev libjpeg-turbo git
# Get Python libraries
pip install --upgrade pip
pip install --upgrade setuptools
LIBRARY_PATH="/system/lib" CPATH="$PREFIX/include" pip install pillow
# Pull the project
git clone https://github.com/BranislavBajuzik/ColorWallpaper.git
# Setup triggers for Termux:Tasker
mkdir -p ~/.termux/tasker/
echo $'cd ~/ColorWallpaper\npython -m color_wallpaper -y -o /sdcard/Pictures/Excluded/paper.png -c random --min-contrast 2.5 --overlay-color white --overlay-contrast 1.5 -r 1080x2340 -s 4 -f empty \#HEX rgb hsv cmyk' > ~/.termux/tasker/generate-wallpaper.sh
chmod u+x ~/.termux/tasker/generate-wallpaper.sh
# Setup the output folder
mkdir -p /sdcard/Pictures/Excluded
touch /sdcard/Pictures/Excluded/.nomedia
In Tasker:
- Create a new Task
- Add Termux Action with Configuration set to
generate-wallpaper.sh
- Add Set Wallpaper Action with Image set to
Pictures/Excluded/paper.png
- Add Termux Action with Configuration set to
- Create a new Event Profile for Display Off event, give it Highest priority, and set it's Task to the one you just created.
Edit ~/.termux/tasker/generate-wallpaper.sh
to change arguments (e.g. your screen resolution) of the program.
Run cd ~/ColorWallpaper && git pull
to update the program.
Contribute
Setup environment
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
pre-commit install
Run tests
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file color-wallpaper-1.1.8.tar.gz
.
File metadata
- Download URL: color-wallpaper-1.1.8.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab21d4691b61961261dc463b2f15c83904375d2700f6de86a367c6be78ca306e |
|
MD5 | dc360097688e09e35c495768dd064907 |
|
BLAKE2b-256 | 2814c0c5f1b199c1d496027b4bfd4bf46372097fdd73c131c5d21ea8b97b0a33 |
File details
Details for the file color_wallpaper-1.1.8-py3-none-any.whl
.
File metadata
- Download URL: color_wallpaper-1.1.8-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc5a29abcd890eda853bc88b1169888ad29a3c13ae0b06313e7cdc31e0f915d |
|
MD5 | 638476c0865fcc2ab42a7b58cf6f6c6c |
|
BLAKE2b-256 | f64b5f5b8e0c235d6b33e07798ab2a44c31bedf15b3e1e4f85e4102f52f68523 |