Drop-in library for nice color maps in C++.
Currently, color maps are from the CET Perceptually Uniform Colour Maps.
Simply include colormaps.h
and use desired color-maps.
Example:
#include <colormaps.h>
using colormaps::rgb_color; // just std::array<double, 3>
auto colormap = colormaps::linear::kryw_0_97_c73; // pick color-map
double x = 0.7; // value in [0,1]
rgb_color color = colormap(x); // (r,g,b) values in [0,1]^3
Feel free to do anything with my code.
The CET Perceptually Uniform Colour Maps are Peter Kovesi's work.
Please cite the corresponding paper (given in Peter's page) if you find the color maps useful.