Skip to main content

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

Project description

https://badge.fury.io/py/colormap.svg 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


Download files

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

Source Distribution

colormap-0.9.2.tar.gz (14.6 kB view details)

Uploaded Source

File details

Details for the file colormap-0.9.2.tar.gz.

File metadata

  • Download URL: colormap-0.9.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for colormap-0.9.2.tar.gz
Algorithm Hash digest
SHA256 7bd5944ffba76270e7e1e80da86193e67bf6ee5aea039991e2dc90df1f2b917e
MD5 712ad598846f0e487402d5756f5b3703
BLAKE2b-256 96780f8ebc9dedb01d5eaf6868ad5c4b248a30587c772cd67f50b859c981ec27

See more details on using hashes here.

Supported by

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