Skip to main content

Color schemes for lines and maps, color-blind safe

Project description


Color schemes for lines and maps, color-blind safe

PyPI GitHub release

Thoses 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 thoses schemes can be found on his website and in the docs directory.


Using pip:

pip install tol-colors

From source:

git clone
cd tol_colors
pip install .

Get started

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

import tol_colors as tc

Get a colorset:

cset = tc.tol_cset('bright')

Get a colormap:

cmap = tc.tol_cmap('sunset')

See the functions docstrings for details.

To change default colorset (for lines) and colormap:

import matplotlib.pyplot as plt
plt.rc('axes', prop_cycle=plt.cycler('color', list(tc.tol_cset('bright'))))'rainbow_PuRd', tc.tol_cmap('rainbow_PuRd'))
plt.rc('image', cmap='rainbow_PuRd')


  • 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.2.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

tol_colors-1.2.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

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