Expand description
Named colormap system for mapping scalar values to colors.
This module provides a Colormap enum with popular scientific colormaps
backed by the colorous crate. Colormaps are used to map a continuous
scalar value in [0, 1] (or an arbitrary [vmin, vmax] range) to an RGBA
Color.
§Examples
use plotkit_core::colormap::Colormap;
let cmap = Colormap::Viridis;
let color = cmap.map(0.5);
assert_eq!(color.a, 255);