pub trait Color {
fn to_backend_color(&self) -> BackendColor;
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 { ... }
fn stroke_width(&self, width: u32) -> ShapeStyle { ... }
}
Expand description
Any color representation
Required Methods
sourcefn to_backend_color(&self) -> BackendColor
fn to_backend_color(&self) -> BackendColor
Normalize this color representation to the backend color
Provided Methods
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