Struct plotters::prelude::PaletteColor[][src]

pub struct PaletteColor<P: Palette>(_, _);
Expand description

A color in the given palette

Implementations

impl<P: Palette> PaletteColor<P>[src]

pub fn pick(idx: usize) -> PaletteColor<P>[src]

Pick a color from the palette

Trait Implementations

impl<P: Palette> Color for PaletteColor<P>[src]

fn to_backend_color(&self) -> BackendColor[src]

Normalize this color representation to the backend color

fn rgb(&self) -> (u8, u8, u8)[src]

Convert the RGB representation to the standard RGB tuple

fn alpha(&self) -> f64[src]

Get the alpha channel of the color

fn mix(&self, value: f64) -> RGBAColor[src]

Mix the color with given opacity

fn to_rgba(&self) -> RGBAColor[src]

Convert the color into the RGBA color which is internally used by Plotters

fn filled(&self) -> ShapeStyle where
    Self: Sized
[src]

Make a filled style form the color

fn stroke_width(&self, width: u32) -> ShapeStyle where
    Self: Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.