Skip to main content

A tool for retheming images and CSS using color palettes and gradients.

Project description

superwand

SuperWand Studio

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 --color1 and --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
before after
menu menu_tropical

Color Themes

Themes included:

Spring
Spring
Summer
Summer
Winter
Winter
Fall
Fall
Arctic
Arctic
Safari
Safari
Urban
Urban
Neon
Neon
Tropical
Tropical
Paixão
Paixão
Vaporwave
Vaporwave
Cyberpunk
Cyberpunk
Retro80s
Retro80s
Sunset
Sunset
Midnight
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
Original Arctic Fall Neon Tropical

Austin Ladybird Lake Plankton rendered in ZIT

Original Spring Summer Winter Safari
Original Spring Summer Winter Safari

Me in Rio de Janeiro

Original Paixão Urban Arctic Fall
Original Paixão Urban Arctic Fall

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

superwand-0.1.16.tar.gz (18.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superwand-0.1.16-py3-none-any.whl (18.3 MB view details)

Uploaded Python 3

File details

Details for the file superwand-0.1.16.tar.gz.

File metadata

  • Download URL: superwand-0.1.16.tar.gz
  • Upload date:
  • Size: 18.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for superwand-0.1.16.tar.gz
Algorithm Hash digest
SHA256 8acc7d5e6c00d8247c7e0be94848b925ea82ff9494b4b1f733e1052211d37b07
MD5 f4a6de97c4d08f191d102f9ab4d7da82
BLAKE2b-256 309f00b2834526fce8b438245bc3410f910257ca212ab59dff0e64fa0887746b

See more details on using hashes here.

Provenance

The following attestation bundles were made for superwand-0.1.16.tar.gz:

Publisher: publish.yml on juleshenry/superwand

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file superwand-0.1.16-py3-none-any.whl.

File metadata

  • Download URL: superwand-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 18.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for superwand-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2119064af34498b5874276adb42d3eab44d7b46ec3a7ebffbda35e3e462fe3
MD5 349befa84a9018557b69a3049aeed3fa
BLAKE2b-256 a88210e03e625bdcc052f2eed4e53964685e84af56675a7f710560fd9b4b79aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for superwand-0.1.16-py3-none-any.whl:

Publisher: publish.yml on juleshenry/superwand

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page