pub struct DiscretePalette {
pub meta: ColormapMeta,
pub colors: &'static [[u8; 3]],
}Expand description
A discrete palette of distinct colors for categorical data.
Unlike Colormap, a DiscretePalette has a fixed set of colors
and does not interpolate between them.
Fields§
§meta: ColormapMeta§colors: &'static [[u8; 3]]Implementations§
Source§impl DiscretePalette
impl DiscretePalette
Sourcepub fn all_colors(&self) -> Vec<Color>
pub fn all_colors(&self) -> Vec<Color>
All colors as a Vec.
Trait Implementations§
Source§impl Clone for DiscretePalette
impl Clone for DiscretePalette
Source§fn clone(&self) -> DiscretePalette
fn clone(&self) -> DiscretePalette
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiscretePalette
impl Debug for DiscretePalette
impl Copy for DiscretePalette
Auto Trait Implementations§
impl Freeze for DiscretePalette
impl RefUnwindSafe for DiscretePalette
impl Send for DiscretePalette
impl Sync for DiscretePalette
impl Unpin for DiscretePalette
impl UnsafeUnpin for DiscretePalette
impl UnwindSafe for DiscretePalette
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more