A tool for retheming images and CSS using color palettes and gradients.
Project description
superwand
Leverage magic wand to breath life to images, especially posterized and vector art images.
Setup
uv sync
SuperWand Studio
The SuperWand Studio provides an interactive web interface for real-time image retheming, CSS retheming, and gradient application.
Running the Studio
Simply run the superwand command without applying a theme:
superwand
Access the UI
Once the server is running, open your browser and navigate to http://127.0.0.1:5001.
CLI Usage
Apply a Theme
superwand examples/images/zebra.png -theme Urban
Arguments
image_path: Path to the input image file (optional if starting studio).-theme: Theme to apply (Tropical, Urban, Winter, etc.).-k: Number of regions to identify (default: 4).-tolerance: Color matching tolerance (default: 50).-flood: Apply morphological flood filling (default: False).-gradient: Gradient style (none, auto, vertical, horizontal, radial, bottom-up, top-down, left-right, right-left) (default: none). When a theme is applied, the gradient transitions from the primary theme color of the region to the next color in the theme.-polarity: Gradient midpoint bias (0.0 to 1.0, default: 0.5). 0.5 is linear, lower values bias towards the start color, higher values bias towards the end color.
Enforce Gradients
gradient-enforce examples/images/charizard.png --style radial --color1 "#FF0000" --color2 "#0000FF"
Arguments
image_path: Path to the input image.--style: Direction of gradients (auto, vertical, horizontal, radial, bottom-up, top-down, left-right, right-left) (default: auto).--completeness: Impacted regions (auto, aggressive, filter) (default: auto).--opacity: Opacity handling (default: auto).--polarity: Gradient midpoint bias (0.0 to 1.0, default: 0.5).--output: Path to the output image (default: gradient_<style>_.png).--color1: Start color for the gradient (e.g., '255,0,0' or '#FF0000').--color2: End color for the gradient (e.g., '0,0,255' or '#0000FF').
Note on Colors: By default, the start and end colors are automatically derived from each region's original color by adjusting its brightness. To explicitly define the gradient colors, use
--color1and--color2. When provided, all prominent regions will be replaced with a gradient transitioning between these two colors.
Gradients
Included: bottom-up, top-down, left-right, right-left, radial
| bottom-up |
top-down |
left-right |
right-left |
radial |
CSS Retheming
Identify color schemes in CSS and replace with a theme.
| Before | After |
|---|---|
Color Themes
Themes included:
| Spring |
Summer |
Winter |
Fall |
Arctic |
| Safari |
Urban |
Neon |
Tropical |
Paixão |
| Vaporwave |
Cyberpunk |
Retro80s |
Sunset |
Midnight |
Example: Charizard
| Spring |
Summer |
Fall |
Winter |
Arctic |
| Safari |
Urban |
Neon |
Tropical |
Paixão |
| Vaporwave |
Cyberpunk |
Retro80s |
Sunset |
Midnight |
Gallery
Rio De Janeiro Skyline
| Original | Arctic | Fall | Neon | Tropical |
|---|---|---|---|---|
Austin Ladybird Lake Plankton rendered in ZIT
| Original | Spring | Summer | Winter | Safari |
|---|---|---|---|---|
Me in Rio de Janeiro
| Original | Paixão | Urban | Arctic | Fall |
|---|---|---|---|---|
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superwand-0.2.10.tar.gz.
File metadata
- Download URL: superwand-0.2.10.tar.gz
- Upload date:
- Size: 15.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2766ffea75c98aec883c6251067dee7f59edc8bb31ed25803f621e82e4e9c4
|
|
| MD5 |
bb8d393f2f6b91ac11f02ce16b47cbc2
|
|
| BLAKE2b-256 |
d8700a462a81d6c25548c908f4d8140cdb102e11a5c16fc3dd95c9547886875c
|
Provenance
The following attestation bundles were made for superwand-0.2.10.tar.gz:
Publisher:
publish.yml on juleshenry/superwand
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superwand-0.2.10.tar.gz -
Subject digest:
0b2766ffea75c98aec883c6251067dee7f59edc8bb31ed25803f621e82e4e9c4 - Sigstore transparency entry: 1004617776
- Sigstore integration time:
-
Permalink:
juleshenry/superwand@e19ff1f55fb1b019d79d59866910474ac2915ff5 -
Branch / Tag:
refs/tags/v0.2.10 - Owner: https://github.com/juleshenry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e19ff1f55fb1b019d79d59866910474ac2915ff5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file superwand-0.2.10-py3-none-any.whl.
File metadata
- Download URL: superwand-0.2.10-py3-none-any.whl
- Upload date:
- Size: 15.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9f62ba33a94bc1602382be09851d720fff40d5149ab4feab6bd904098c7dcda
|
|
| MD5 |
357a4ab0dfcc49c44ce53d08260d13e7
|
|
| BLAKE2b-256 |
dc5058b7445d5bdb632798805fc59b388480b3ddf12d967128fe4412489df825
|
Provenance
The following attestation bundles were made for superwand-0.2.10-py3-none-any.whl:
Publisher:
publish.yml on juleshenry/superwand
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superwand-0.2.10-py3-none-any.whl -
Subject digest:
b9f62ba33a94bc1602382be09851d720fff40d5149ab4feab6bd904098c7dcda - Sigstore transparency entry: 1004617779
- Sigstore integration time:
-
Permalink:
juleshenry/superwand@e19ff1f55fb1b019d79d59866910474ac2915ff5 -
Branch / Tag:
refs/tags/v0.2.10 - Owner: https://github.com/juleshenry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e19ff1f55fb1b019d79d59866910474ac2915ff5 -
Trigger Event:
push
-
Statement type: