Commn utilities to ease development of Python packages
Project description
Please see : http://colormap.readthedocs.io/ for an up-to-date documentation.
- version:
Python 3.8, 3.9, 3.10, 3.11, 3.12
- contributions:
Please join https://github.com/cokelaer/colormap
- issues:
Please use https://github.com/cokelaer/colormap/issues
- notebook:
Please see https://github.com/cokelaer/colormap/tree/main/notebooks
What is it ?
colormap package provides simple utilities to convert colors between RGB, HEX, HLS, HUV and a class to easily build colormaps for matplotlib. All matplotlib colormaps and some R colormaps are available altogether. The plot_colormap method (see below) is handy to quickly pick up a colormaps and the test_colormap is useful to see test a new colormap.
Installation
pip install colormap
Example
Create your own colormap from red to green colors with intermediate color as whitish (diverging map from red to green):
c = Colormap() mycmap = c.cmap( {'red':[1,1,0], 'green':[0,1,.39], 'blue':[0,1,0]}) cmap = c.test_colormap(mycmap)
Even simpler if the colormap is linear:
c = Colormap() mycmap = c.cmap_linear('red', 'white', 'green(w3c)') cmap = c.test_colormap(mycmap)
check out the available colormaps:
c = Colormap() c.plot_colormap('diverging')
See online documentation for details: http://colormap.readthedocs.io/
changelog
Version |
Description |
---|---|
1.1.0 |
|
1.0.6 |
|
1.0.5 |
|
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file colormap-1.2.0.tar.gz
.
File metadata
- Download URL: colormap-1.2.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6a9ae93dff67c44c1715680c8c00a9de05a8e9c556b6219d07fa8418414e7fa |
|
MD5 | c348cd25f8e7fb0529bb4d8215bb512d |
|
BLAKE2b-256 | 84774e5ecfd8236d209021875354fd459e19c51d4a62571dcdb93091c930ce7a |
File details
Details for the file colormap-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: colormap-1.2.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e33d06cdf64371e43582f48f9640cab32440e57ad82b31255375c66c8f8e7ad |
|
MD5 | ff6b90b2988516867b437d4b4d8592ac |
|
BLAKE2b-256 | 5cf605f9ad3cda3a59392354c01e28f82af8c491076317d8d1005ccf68ce6c52 |