MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <ColorMap.h>
Public Member Functions | |
u32 | GetSelectedColor (float value, float min, float max, u32 badColor) const |
u32 | GetInterpolatedColor (float value, float min, float max, u32 badColor) const |
Static Public Member Functions | |
static u32 | GetMapCount () |
static ColorMap & | GetMap (u32 index) |
A bunch of color scales and gradients for heat-map and similar types of displays. Based on suggestions from colorbrewer2.org, restricting to 'colorblind safe' and 'print friendly' choices. We include samples of 'sequential', 'diverging', and 'qualitative' palettes (see colorbrewer2.org for details), and both sets of five colors, which have a distinguished center color, and sets of six colors, which have a distinguished center 'break' between two colors
u32 MFM::ColorMap::GetInterpolatedColor | ( | float | value, |
float | min, | ||
float | max, | ||
u32 | badColor | ||
) | const |
Map value, which must be in the range of min..max to a color interpolated linearly between five or six different colors equally spaced from min to max. If max<=min or value is out of range, return badColor.
|
static |
|
static |
Gets the number of ColorMaps loaded into the system.
u32 MFM::ColorMap::GetSelectedColor | ( | float | value, |
float | min, | ||
float | max, | ||
u32 | badColor | ||
) | const |
Map value, which must be in the range of min..max to one of five different colors. If max<=min or value is out of range, return badColor. Only five or six different colors (plus possibly badColor) will be returned by this function.