Skip to main content

Color schemes for lines and maps, color-blind safe

Project description

Tol_colors

Color schemes for lines and maps, color-blind safe

PyPI GitHub release

Those color schemes were designed by Paul Tol. This repository is only packaging his work so that it can be easily installed using pip. His work and details on how to use those schemes can be found on his website and in the docs directory.

Install

Using pip:

pip install tol-colors

From source:

git clone https://github.com/Descanonge/tol_colors.git
cd tol_colors
pip install .

Get started

Get a colorset:

cset = tc.get_colorset('bright')

Get a colormap:

cmap = tc.get_colormap('sunset')

Show the available colorsets, colormaps, and the discrete rainbow colormap:

python -m tol_colors

See each function docstring for details.

To change the default matplotlib colorset or colormap:

import matplotlib.pyplot as plt
plt.rc('axes', prop_cycle=plt.cycler('color', list(tc.get_colorset('bright'))))
plt.colormaps.register(name='rainbow_PuRd', cmap=tc.get_colormap('rainbow_PuRd'))
plt.rc('image', cmap='rainbow_PuRd')

Requirements

  • numpy
  • matplotlib

See also

Other packages already implement these colorschemes and might better suit your needs:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tol_colors-1.3.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

tol_colors-1.3.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file tol_colors-1.3.0.tar.gz.

File metadata

  • Download URL: tol_colors-1.3.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for tol_colors-1.3.0.tar.gz
Algorithm Hash digest
SHA256 5276b52df70032e3401b2c8c6c055e676dc05db8bb760155dc555a93318d7a25
MD5 36e6e276a6751254580dca117216ee36
BLAKE2b-256 dd5f812625ceb20af3c553509ceb44a7548eb00525427ff212081818f82ff030

See more details on using hashes here.

File details

Details for the file tol_colors-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: tol_colors-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for tol_colors-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18b10fde67f1f03f5e199f4ca81d486d3100bf6d7d4e0f4670cdb0ddd47eec06
MD5 568164a6ca34c0bb14537a2937a9ba7e
BLAKE2b-256 25dfde817ef13bb4df5ec14f50993b6bef2c06f3cbf229c6e2afeef27753294a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page