chromophile

Color maps for continuous quantitative data


License
Other
Install
pip install chromophile==1.0.1

Documentation

Chromophile-dev

The main Chromophile documentation is at https://chromophile.readthedocs.io/en/latest/index.html.

This package contains development tools for the Chromophile color maps. Most users will not need this package. It is only useful if you want to create your own Chromophile-style color maps, distribute the existing color maps in new formats, or build the documentation yourself.

Usage

Install the package with pip. The most important executables are:

  • cp_search conducts systematic searches for new color maps.
  • cp_edit re-optimizes and displays existing color maps. It also generates binary data used when distributing the color maps.
  • cp_make_dist uses the binary data generated by cp_edit to generate distributions suitable for end users.

Less important tools include:

  • cp_create creates new color maps.
  • cp_print displays tabular information about a collection of color maps. It was used to create tables for the documentation.
  • cp_show displays Chromophile color maps. It was used to generate the pictures of the color maps in the documentation.
  • cp_colorspace draws pictures of color spaces. It was used to generate the color space pictures in the documentation.

Workflow

Generally, I used cp_search to look for interesting color maps. I modified parameters by hand and ran cp_edit to re-optimize. Unexpectedly, I found cp_create to be of little use.

The raw parameters for the Chromophile color maps are stored as JSON in chromophile_dev/data. The color maps stored in this directory are the only ones recognized by the -n and -r arguments to the above executables. Color maps not stored in that directory must be specified using -f.

The chromophile_dev/distributions directory contains source files for the end-user distributions. The distributions.json file in that directory has information about the different distributions that can be generated (presently only Python), and the subdirectories have Jinja templates that get processed into the final distributions.

To distribute the color maps, I create a directory outside of the source tree. I use cp_edit -O to generate the final color maps and save them as binary data, and I use cp_make_dist to turn this data into a format suitable for distribution.