[][src]Struct charts::Color

pub struct Color { /* fields omitted */ }

A struct that represents a color.

Methods

impl Color[src]

pub fn from_vec_of_hex_strings(color_strings: Vec<&str>) -> Vec<Self>[src]

Generate a color scheme from a string. Useful when displaying a single dataset that requires one color.

pub fn color_scheme_10() -> Vec<Self>[src]

Generate a color scheme made of 10 colors.

pub fn color_scheme_tableau_10() -> Vec<Self>[src]

An array of ten categorical colors authored by Tableau as part of Tableau 10.

pub fn color_scheme_dark() -> Vec<Self>[src]

An array of eight categorical colors

pub fn as_hex(&self) -> String[src]

Represent a color as a hex string.

Trait Implementations

impl Debug for Color[src]

Auto Trait Implementations

impl RefUnwindSafe for Color

impl Send for Color

impl Sync for Color

impl Unpin for Color

impl UnwindSafe for Color

Blanket Implementations

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

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

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

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

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

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.

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.