Skip to content

itsuhane/colormaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

colormaps

Drop-in library for nice color maps in C++.

Currently, color maps are from the CET Perceptually Uniform Colour Maps.

Usage

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

Licence & Reference

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.

About

Drop-in library for nice color-maps in C++.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages