custom_colors_palette
Python package to create a custom color palette.
Version
0.2.2
Requirements
- Numpy
- Matplotlib
Usage
See the jupyter notebooks examples for the last version:
Examples for older version can be found here
Reference Guide
Click on the item to see the function and their description.
range
range(vmin, vmax, step)
Creates a range of numbers that include the extreme values.
Parameters
----------
vmin: int or float
First value of sequence of numbers.
vmax: int or float
Last value of sequence of numbers.
step: int or float
Step used to create sequence of numbers between vmin and vmax.
Returns
-------
Return a numpy.ndarray with range of number between vmin and vmax.
creates_palette
creates_palette(Palette_Attr, extend='neither', lower_color=None, upper_color=None, nan_color=None)
Creates a custom color palette from color list.
Parameters
----------
Palette_Attr : list
List that contains sublists with the characteristics of the
colors that will be used to create a custom color palette.
Each sublist must has three elements: [Colors, Limits, Stretch]
Colors : list or Matplotlib's Colormap
Defines the colors that will be used to create the
palette. Colors must be a Matplotlib's Colormap,
a list with Matplotlib's colors name,
a list with Hex color code or
a list with RGB color code.
Limits : list or numpy.ndarray
Defines the limits of each color of palette.
Stretch : list, optional
Optional list used to stretch the color palette
in order to obtain colors from a specific region.
Stretch must have 3 elements: [Values, Vini, Vfin]
Values : list or numpy.ndarray
Sequence of numbers that will be cut.
Vini : int or float
First value used to cut Values.
Vfin : int or float
Last value used to cut Values.
If Stretch is defined, the number of colors between
Vini and Vfin must be equal to Colors.
extend : str, default 'neither'
It is an optional parameter that is used to sets the extreme color of
palette. The valid options are 'neither', 'min', 'max', and
'both'.
lower_color : str, tuple, or None, default None
It defines lower color of palette.
upper_color : str, tuple, or None, default None
It defines upper color of palette.
nan_color : str, tuple, or None, default None
It defines color of nan values.
Returns
-------
Palette: object
Custom color palette
Ticks: list
Limits of each color in the palette.
Norm: class matplotlib.colors.BoundaryNorm
Norm of limits of each color.
Bounds: list
List with limits of each colors of Palette, including the extend values.
Installation
You can install custom_color_palette on Python 2 or 3 on Linux, Windows or other, using the following commands.
Using PIP:
pip install custom-color-palette
Check if package was installed with:
pip show custom-color-palette
If you already have the package installed, update it to the latest version with:
pip install --upgrade custom-color-palette
Using clone:
clone https://github.com/joaohenry23/custom_color_palette.git
cd custom_color_palette
python setup.py install
Using python:
Download custom_color_palette-master.zip from github and following the next commands:
unzip custom_color_palette-master.zip
cd custom_color_palette-master
python setup.py install
Support
If you have any questions, do not hesitate to write to:
joaohenry23@gmail.com
Metadata
Release files for custom-color-palette 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| custom_color_palette-0.2.2.tar.gz | 4.2 kB | Without provenance | Details for custom_color_palette-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| custom_color_palette-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for custom_color_palette-0.2.2-py3-none-any.whl |
Total release size: 10.4 kB
Release files / custom_color_palette-0.2.2.tar.gz
| Download URL | custom_color_palette-0.2.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e42a6e8b37a0be69b972582681549a3d687c256ecfb5221e1b7aae1ed80276
|
|
BLAKE2b-256 checksum How to use checksums |
ff720955fd45a8c891b9c45b26a96d74b4f7d6a0ff6b3dd76c1f8f7b6a6cfee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.11
|
Release files / custom_color_palette-0.2.2-py3-none-any.whl
| Download URL | custom_color_palette-0.2.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a469267344dd4b1db03b1ffd4b6b6208c0e85a8be381b6a9807fa248edb7a387
|
|
BLAKE2b-256 checksum How to use checksums |
b58846dc4130e072725ec760cf109b32014ecc2cd050b78bfd9cae3a9e19e11a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.6.11
|
Security for custom-color-palette 0.2.2
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.