Pylettes
v0.2.0
pylettes is a lightweight matplotlib-compatible collection of beautiful palettes for Python 3.
See all currently available palettes here.
Installation
pylettes can be easily installed with PiPy
pip install pylettes.
To install the latest (unreleased) version you can download it from this repository by running
git clone https://github.com/fcomitani/pylettes
cd pylettes
python setup.py install
The only requirement is matplotlib >= 1.3.1.
Usage
Palettes can be imported directly from the pylettes package.
They can be transformed into matplotlib color maps by instantiating the class and calling its cmap attribute.
from pylettes import Acapulco2Paris
custom_cmap = Acapulco2Paris().cmap
Single colors can be directly accessed by index.
first_color = Acapulco2Paris()[0]
The show_colors method allows you to visualize and inspect any palette.
Acapulco2Paris().show_colors()
The list of colors can be visualized as a continuous scale by providing the continuous argument.
Acapulco2Paris().show_colors(continuous=True)
Palettes can be reversed by activating the reverse flag upon initialization.
Acapulco2Paris(reverse=True).show_colors()
All currently available palettes can be inspected with list_all_palettes(),
while list_palettes_by_tag() allows you to search palettes by keywords.
All available tags can be listed with list_all_tag().
Finally, to visualize multiple palettes at once use show_multiple_palettes().
For example, you can inspect all colorblind-friendly palettes with
from pylettes import list_palettes_by_tag, show_multiple_palettes
show_multiple_palettes(list_palettes_by_tag('colorblind'))
Contributions
I plan to keep this library updated and add more options with time.
New palette submissions are welcome! Submitting a palette is easy, all you need is a name, the list of colors in hex format and associated tags.
Metadata
Release files for pylettes 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylettes-0.2.0.tar.gz | 17.8 kB | Without provenance | Details for pylettes-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylettes-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pylettes-0.2.0-py3-none-any.whl |
Total release size: 36.9 kB
Release files / pylettes-0.2.0.tar.gz
| Download URL | pylettes-0.2.0.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc89497944a2515675ffd7aebc50eef42bfc5c536c6074361333749aa021646f
|
|
BLAKE2b-256 checksum How to use checksums |
848c51cf5a79eed5831f51a44f61fc0f96c1fdf7017d39377b0c638338b982c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6
|
Release files / pylettes-0.2.0-py3-none-any.whl
| Download URL | pylettes-0.2.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26113b5ec40b77985fcda14c8754c0a1ca8cb77deb4120a67759a57dd5614d88
|
|
BLAKE2b-256 checksum How to use checksums |
c7a763d08b719b78fb8203e0b846f6743d4b0f964ea338e44867d2cc4d2505f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6
|
Security for pylettes 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.