A set of colors.
RColor
s can be conveniently generated from this.
A palette associates a color with an ordinal number: for a normalized palette, this number ranges from 0..1. For user-valued palettes, the palette yields a color for user-coordinates (for instance histogram content), in an arbitrary range.
A palette can be a smooth gradients by interpolation of support points, or a set of discrete colors.
Definition at line 38 of file RPalette.hxx.
ROOT::Experimental::RPalette::RPalette |
( |
const std::vector< OrdinalAndColor > & |
interpPoints | ) |
|
|
inline |
Construct a RPalette from a vector of (ordinal|color) pairs as interpolation points.
Palette colors will be these points for the ordinal, and interpolated in between the ordinal points. The points will be sorted. The palette is normalized if the lowest ordinal is 0. and the highest ordinal is 1.; otherwise, the palette is a user-valued palette.
Definition at line 85 of file RPalette.hxx.
ROOT::Experimental::RPalette::RPalette |
( |
const std::vector< RColor > & |
interpPoints | ) |
|
|
inline |
Construct a normalized RPalette from a vector of colors as interpolation points.
The ordinal associated with each color is equidistant from 0..1, i.e. for three colors it will be 0., 0.5 and 1, respectively. Palette colors will be these points for the ordinal associated with the color, and interpolated in between the ordinal points.
Definition at line 97 of file RPalette.hxx.
ROOT::Experimental::RPalette::RPalette |
( |
Discrete_t |
, |
|
|
const std::vector< RColor > & |
points |
|
) |
| |
|
inline |
Construct a normalized RPalette from a vector of colors.
The ordinal associated with each color is equidistant from 0..1, i.e. for three colors it will be 0., 0.5 and 1, respectively. For a given value, the palette returns the color with an ordinal that is closest to the value.
Definition at line 102 of file RPalette.hxx.