Skip to main content

a utility for separating images for screen printing

Project description

# ColorSep
A utility for separating a single png (such as one produced by an [inkscape](https://inkscape.org/) export) into
separate per-color images such as might be useful for silk screen printing at a place like
[ooshirts](http://www.ooshirts.com).

## Features
The current feature set includes:
- separation into a specifiable number colors
- a "near pixel threshold" option for fuzzily matching colors that are close but not exactly what's expected
- a "white base" option to produce a white pixel under all active pixels of any color
- a specifiable alpha threshold beneath which all pixels will be discarded

## Requirements
Colorsep probably requires python 3. I'll gladly accept PRs to fix this and/or assertions to the contrary. I just
haven't tested it.

## Install
It should be as simple as `pip install colorsep` for python-friendly folks.

## Basic usage
To generate the images I needed to make my t-shirt, I ran this:
```colorsep --input resources/farm_scene.png --output-base output/output_ --num-colors=7 --base-white --near-pixel-threshold=100```

To get help:
```
$ colorsep --help
Usage: colorsep [OPTIONS]

Options:
--input TEXT input png
--output-base TEXT base name of output pngs
--alpha-threshold INTEGER on/off threshold for alpha
--num-colors TEXT use to set number of output colors
--base-white should all color be underlaid with white?
--near-pixel-threshold INTEGER tolerance for nearest-color computation
--help Show this message and exit.
$
```



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

colorsep-0.0.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

colorsep-0.0.2-py3-none-any.whl (3.3 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