Metadata-Version: 2.1
Name: swatcher
Version: 1.0.0
Summary: Generate Adobe ASE swatches from images.
Home-page: http://github.com/joshbduncan/swatcher
Author: Josh Duncan
Author-email: joshbduncan@gmail.com
License: MIT
Keywords: adobe,color,swatches
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow

# 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](https://github.com/nsfmc/swatch) for his work on the Adobe ASE file writer. 👏

## Installation

Install Swatcher with `pip`:

    pip install swatcher

## Usage

```python
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

- [PyPi](https://pypi.python.org/pypi/swatcher)

