[][src]Trait plotters::style::Color

pub trait Color {
    fn rgb(&self) -> (u8, u8, u8);
fn alpha(&self) -> f64; fn mix(&self, value: f64) -> RGBAColor { ... }
fn to_rgba(&self) -> RGBAColor { ... }
fn filled(&self) -> ShapeStyle
    where
        Self: Sized
, { ... }
fn stroke_width(&self, width: u32) -> ShapeStyle
    where
        Self: Sized
, { ... } }

Any color representation

Required methods

fn rgb(&self) -> (u8, u8, u8)

Convert the RGB representation to the standard RGB tuple

fn alpha(&self) -> f64

Get the alpha channel of the color

Loading content...

Provided methods

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

Mix the color with given opacity

fn to_rgba(&self) -> RGBAColor

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

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

Make a filled style form the color

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

Make a shape style with stroke width from a color

Loading content...

Implementations on Foreign Types

impl<S: RgbStandard, T: Component> Color for Rgb<S, T>[src]

impl<S: LumaStandard, T: Component> Color for Luma<S, T>[src]

impl<S: RgbSpace, T: Component + Float> Color for Hsl<S, T>[src]

impl<S: RgbSpace, T: Component + Float> Color for Hsv<S, T>[src]

impl<S: RgbSpace, T: Component + Float> Color for Hwb<S, T>[src]

impl<T: Component + Float> Color for Lab<D65, T>[src]

impl<T: Component + Float> Color for Lch<D65, T>[src]

impl<T: Component + Float> Color for Xyz<D65, T>[src]

impl<T: Component + Float> Color for Yxy<D65, T>[src]

impl<C: Color, T: Component> Color for Alpha<C, T>[src]

Loading content...

Implementors

impl Color for RGBAColor[src]

impl<T: SimpleColor> Color for T[src]

Loading content...