Trait ColorMap
trait ColorMap
A color map
Associated Types
type ColorThe color type on which the map operates on
Required Methods
fn index_of(self: &Self, color: &<Self as >::Color) -> usizeReturns the index of the closest match of
colorin the color map.fn map_color(self: &Self, color: &mut <Self as >::Color)Maps
colorto the closest color in the color map.
Provided Methods
fn lookup(self: &Self, index: usize) -> Option<<Self as >::Color>Looks up color by index in the color map. If
idxis out of range for the color map, orColorMapdoesn't implementlookupNoneis returned.fn has_lookup(self: &Self) -> boolDetermine if this implementation of
ColorMapoverrides the defaultlookup.
Implementors
impl ColorMap for BiLevel