Skip to main content

Commn utilities to ease development of Python packages

Project description

Please see : http://colormap.readthedocs.io/ for an up-to-date documentation.

https://badge.fury.io/py/colormap.svg https://github.com/cokelaer/colormap/actions/workflows/ci.yml/badge.svg?branch=main https://coveralls.io/repos/cokelaer/colormap/badge.png?branch=main
version:

Python 3.8, 3.9, 3.10, 3.11, 3.12

contributions:

Please join https://github.com/cokelaer/colormap

issues:

Please use https://github.com/cokelaer/colormap/issues

notebook:

Please see https://github.com/cokelaer/colormap/tree/main/notebooks

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. All matplotlib colormaps and some R colormaps are available altogether. The plot_colormap method (see below) is handy to quickly pick up a colormaps and the test_colormap is useful to see test a new colormap.

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(w3c)')
    cmap = c.test_colormap(mycmap)
https://colormap.readthedocs.io/en/latest/_images/quickstart-6.png
  • check out the available colormaps:

    c = Colormap()
    c.plot_colormap('diverging')
https://colormap.readthedocs.io/en/latest/_images/quickstart-4.png

See online documentation for details: http://colormap.readthedocs.io/

changelog

Version

Description

1.1.0

  • switch to pyproject. remove easydev dependency. compat for python 3.11 and 3.12

1.0.6

  • Fix a matplotlib deprecation

  • Fix RTD documentation

1.0.5

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-1.1.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colormap-1.1.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colormap-1.1.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for colormap-1.1.1.tar.gz
Algorithm Hash digest
SHA256 30c5de37f7c501debe7f8b3a32bf7c04a3a056c0a95ac97be888f2c457f89fb3
MD5 15a606efcf1cbcf7b419dc3a71034453
BLAKE2b-256 0f4a631b0e20a58b6ff937e363fad491df10e40aa16c1ba6450aeb7254b567e5

See more details on using hashes here.

File details

Details for the file colormap-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: colormap-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for colormap-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 184524a0d448acf514f4226b59ed5142a8591b468f0d1cf2094358d12840b955
MD5 342677a8cc1aa10875b2c89003e9e41e
BLAKE2b-256 344264fd2f5ec2adf03faa94a6924e7beb6549fec16f90697d04800aa20bd4a4

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