pub struct PaletteColor<P>(_, _)
where
P: Palette;Available on crate feature
plot only.Expand description
A color in the given palette
Implementations
sourceimpl<P> PaletteColor<P> where
P: Palette,
impl<P> PaletteColor<P> where
P: Palette,
sourcepub fn pick(idx: usize) -> PaletteColor<P>
pub fn pick(idx: usize) -> PaletteColor<P>
Pick a color from the palette
Trait Implementations
sourceimpl<P> Color for PaletteColor<P> where
P: Palette,
impl<P> Color for PaletteColor<P> where
P: Palette,
sourcefn to_backend_color(&self) -> BackendColor
fn to_backend_color(&self) -> BackendColor
Normalize this color representation to the backend color
sourcefn to_rgba(&self) -> RGBAColor
fn to_rgba(&self) -> RGBAColor
Convert the color into the RGBA color which is internally used by Plotters
sourcefn filled(&self) -> ShapeStyle
fn filled(&self) -> ShapeStyle
Make a filled style form the color
sourcefn stroke_width(&self, width: u32) -> ShapeStyle
fn stroke_width(&self, width: u32) -> ShapeStyle
Make a shape style with stroke width from a color
Auto Trait Implementations
impl<P> RefUnwindSafe for PaletteColor<P> where
P: RefUnwindSafe,
impl<P> Send for PaletteColor<P> where
P: Send,
impl<P> Sync for PaletteColor<P> where
P: Sync,
impl<P> Unpin for PaletteColor<P> where
P: Unpin,
impl<P> UnwindSafe for PaletteColor<P> where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more