About
This is a small package to easily generate colormaps from images which was built as a fun hack and should not be used to generate colormaps for serious visualization work since there is no guarantee that the colormaps made will be e.g. perceptually uniform.
Installing
To install:
pip install colormapize
Using
To use, run:
colormapize your_image.jpg colormap_name
where colormap_name is what you want to call your colormap, for example:
colormapize your_image.jpg kittens
This should open a Matplotlib window. Click once to define the start of a path and click again to define the end of the path. You can then use the + and - keys to add more samples along the path. If you are not happy with the path, just click twice again to define a new path. Once you are happy with it, press ‘enter’ or ‘c’ and you will see a preview of the colormap on the right of the image, and the colormap will also be saved to e.g.``cmap_kittens.py``. You can continue to redefine the path until you are happy with it, and the file will be overwritten every time you press ‘enter’ or ‘c’. Close the window once you are done.
To use, make sure the colormap file (e.g. cmap_kittens.py) is in the same directory as the directory where you want to make plots, and you can then use it as follows in other scripts:
import colormap_kittens ... plt.imshow(mydata, cmap='kittens')
Release files for colormapize 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| colormapize-0.2.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| colormapize-0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 8.4 kB
Release files / colormapize-0.2.tar.gz
| Download URL | colormapize-0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eff46864f28c6a4526ba927edd7c03cfd8e6a573270521e6ea653322f0eab57b
|
|
BLAKE2b-256 checksum How to use checksums |
6a71a73535546c5f56be5e9f108a71554e4525bfdfa76c8cf2695711be6121a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|
Release files / colormapize-0.2-py2.py3-none-any.whl
| Download URL | colormapize-0.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
228f8327c17e028b3cb8100853c951145d7c68a38e66c17fc24aeae77d7ad28e
|
|
BLAKE2b-256 checksum How to use checksums |
13fc69a6642e5edbcff1541595801332b5a0465671175cf611c36dc69bd47003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|