Skip to main content

Utilities to ease manipulation of matplotlib colormaps and color codecs (e.g., hex2rgb)

Project description

https://pypip.in/d/colormap/badge.png https://secure.travis-ci.org/cokelaer/colormap.png https://coveralls.io/repos/cokelaer/colormap/badge.png?branch=master https://landscape.io/github/cokelaer/colormap/master/landscape.png https://badge.waffle.io/cokelaer/colormap.png?label=ready&title=Ready
version:Python 2.7, 3.3, 3.4
contributions:Please join https://github.com/cokelaer/colormap
issues:Please use https://github.com/cokelaer/colormap/issues

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.

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')
    cmap = c.test_colormap(mycmap)
    
  • check out the available colormaps:

    c = Colormap()
    c.plot_colormap('diverging')
    
http://pythonhosted.org//colormap/_images/colormaps.png

See oneline documentation for details: http://pythonhosted.org//colormap/

Project details


Release history Release notifications

History Node

1.0.1

History Node

1.0.0

History Node

0.9.10

History Node

0.9.9

History Node

0.9.8

History Node

0.9.7

History Node

0.9.6

History Node

0.9.5

History Node

0.9.4

History Node

0.9.3

History Node

0.9.2

This version
History Node

0.9.1

History Node

0.9.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
colormap-0.9.1.tar.gz (14.6 kB) Copy SHA256 hash SHA256 Source None Sep 19, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page