holoviz / colorcet

A set of useful perceptually uniform colormaps for plotting scientific data
http://colorcet.holoviz.org
Other
682 stars 52 forks source link

Building own colormaps based on 2-3 input colors #40

Closed sebhahn closed 5 years ago

sebhahn commented 5 years ago

Is it possible to build own colormaps that are perceptually uniform colormaps? E.g. simply defining 3 colors (blue, yellow, brown) and having a function which computes some colormaps samples?

jbednar commented 5 years ago

It's possible, but colorcet doesn't currently include any code for constructing uniform colormaps; it simply includes the colormaps generated by Peter Kovesi using the code at https://peterkovesi.com/projects/colourmaps/ . I'd be happy to include a Python port of that code to provide such functionality, but don't have any plans to make such a port myself. Also see https://github.com/matplotlib/viscm, which has a somewhat different definition of uniformity but is already in Python and may meet your needs.

sebhahn commented 5 years ago

Thanks for your help!