Skip to main content

Generate Adobe ASE swatches from images.

Reason this release was yanked:

api changes

Project description

Swatcher

Swatcher is a Python module for generating Adobe ASE color swatches from images.

Background

Swatcher was born out of necessity in my day job as a Graphic Designer. 👨‍💻

Often, I need to extract exact color values from images for use in Adobe products and I just couldn't find a good way...

"Isn't there already software that samples colors from images?"

Yeah, there's a bunch, problem is, most are designed for sampling photographs and use algorithms that provide approximate color values. I typically sample computer generated graphics with fairly distinct colors, and, I need exact values. 🎯

FYI, Swatcher works great on photographs too! 📸

Credit to Marcos Ojeda for his work on the Adobe ASE file writer. 👏

Installation

Install Swatcher with pip:

pip install swatcher

Usage

from swatcher import Swatcher

s = Swatcher('/path/to/your/image.jpg')

# sample the most common colors (default settings)
palette = s.palette

# view the sampled palette (RGB values)
s.palette

# view an image of the sampled palette swatches
s.show_palette_image()

# resample the image with new settings
s.sample(max_colors=4, sensitivity=50)

# export sampled colors as an adobe ase swatch file
s.export_ase_file()

# save an image of the sampled palette swatches
s.export_palette_image()

Resources

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

swatcher-1.0.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

swatcher-1.0.0-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

Supported by

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