Struct color_brewery::Palette
source · pub struct Palette<Color> { /* private fields */ }
Implementations§
source§impl<Color> Palette<Color>where
Color: RGBColor,
impl<Color> Palette<Color>where Color: RGBColor,
Color palettes (aka colormaps)
A Colormap with certain characteristics.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of colors in the palette.
Palettes countains at least 2 colors.
sourcepub fn typ(&self) -> PaletteType
pub fn typ(&self) -> PaletteType
Says whether the palette is Seq
uential, Div
ergent or
Qual
itative.
sourcepub fn blind(&self) -> Trivalent
pub fn blind(&self) -> Trivalent
Says whether the palette is colorblind safe (if the palette specifies it).
sourcepub fn print(&self) -> Trivalent
pub fn print(&self) -> Trivalent
Says whether the palette is suitable for desktop color printing.
sourcepub fn photocopy(&self) -> Trivalent
pub fn photocopy(&self) -> Trivalent
Says whether the palette will withstand black and white photocopying.
sourcepub fn lcd(&self) -> Trivalent
pub fn lcd(&self) -> Trivalent
Says whether the palette is friendly for LCD screens (which tend to wash-out colors).
sourcepub fn gradient(&self) -> PaletteGradient<Color>
pub fn gradient(&self) -> PaletteGradient<Color>
Returns a gradient constructed from the palette. It only makes sense for sequential and some diverging palettes.