Skip to main content
# 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.
$
```



Metadata

Release files for colorsep 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorsep 0.0.3
File Size Uploaded
colorsep-0.0.3.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colorsep 0.0.3
File Interpreter ABI Platform
colorsep-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / colorsep-0.0.3.tar.gz

Download URL colorsep-0.0.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c78071393343f19764f88746bf6c41a3cd3fe7e8d422717a88a0deaa966ef02d
BLAKE2b-256 checksum
How to use checksums
f0c3984028809c56855e352dd2cfdd76d2ee8c06274f7d30ff9b6d8b4fffa48e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Release files / colorsep-0.0.3-py3-none-any.whl

Download URL colorsep-0.0.3-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cac4cf271ada63a18fb12c83e331c864eae78611afc299fe02000a5985c0343
BLAKE2b-256 checksum
How to use checksums
112016e21280e4501bea376d94eabf742d3fc127542ec9b2bf9cf0f6f8a05c08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page