pub struct RGBAColor(pub u8, pub u8, pub u8, pub f64);
Expand description
The RGBA representation of the color, Plotters use RGBA as the internal representation of color
If you want to directly create a RGB color with transparency use RGBColor::mix
Tuple Fields§
§0: u8
§1: u8
§2: u8
§3: f64
Trait Implementations§
source§impl BackendStyle for RGBAColor
impl BackendStyle for RGBAColor
source§fn color(&self) -> BackendColor
fn color(&self) -> BackendColor
Get the color of current style
source§fn stroke_width(&self) -> u32
fn stroke_width(&self) -> u32
Get the stroke width of current style
source§impl Color for RGBAColor
impl Color for RGBAColor
source§fn to_backend_color(&self) -> BackendColor
fn to_backend_color(&self) -> BackendColor
Normalize this color representation to the backend color
source§fn to_rgba(&self) -> RGBAColor
fn to_rgba(&self) -> RGBAColor
Convert the color into the RGBA color which is internally used by Plotters
source§fn filled(&self) -> ShapeStylewhere
Self: Sized,
fn filled(&self) -> ShapeStylewhere
Self: Sized,
Make a filled style form the color
source§fn stroke_width(&self, width: u32) -> ShapeStylewhere
Self: Sized,
fn stroke_width(&self, width: u32) -> ShapeStylewhere
Self: Sized,
Make a shape style with stroke width from a color
source§impl<FloatType: Float + FromPrimitive + ToPrimitive> ColorMap<RGBAColor, FloatType> for DerivedColorMap<RGBAColor>
Available on crate feature colormaps
only.
impl<FloatType: Float + FromPrimitive + ToPrimitive> ColorMap<RGBAColor, FloatType> for DerivedColorMap<RGBAColor>
Available on crate feature
colormaps
only.source§fn get_color_normalized(
&self,
h: FloatType,
min: FloatType,
max: FloatType,
) -> RGBAColor
fn get_color_normalized( &self, h: FloatType, min: FloatType, max: FloatType, ) -> RGBAColor
A slight abstraction over get_color function where lower and upper bound can be specified.
source§fn get_color(&self, h: FloatType) -> ColorType
fn get_color(&self, h: FloatType) -> ColorType
Takes a scalar value 0.0 <= h <= 1.0 and returns the corresponding color.
Typically color-scales are named according to which color-type they return.
To use upper and lower bounds with this function see get_color_normalized.
source§impl<FloatType: Debug + Float + FromPrimitive + ToPrimitive> ColorMap<RGBAColor, FloatType> for ViridisRGBA
Available on crate feature colormaps
only.
impl<FloatType: Debug + Float + FromPrimitive + ToPrimitive> ColorMap<RGBAColor, FloatType> for ViridisRGBA
Available on crate feature
colormaps
only.source§fn get_color_normalized(
&self,
h: FloatType,
min: FloatType,
max: FloatType,
) -> RGBAColor
fn get_color_normalized( &self, h: FloatType, min: FloatType, max: FloatType, ) -> RGBAColor
A slight abstraction over get_color function where lower and upper bound can be specified.
source§fn get_color(&self, h: FloatType) -> ColorType
fn get_color(&self, h: FloatType) -> ColorType
Takes a scalar value 0.0 <= h <= 1.0 and returns the corresponding color.
Typically color-scales are named according to which color-type they return.
To use upper and lower bounds with this function see get_color_normalized.
impl Copy for RGBAColor
impl StructuralPartialEq for RGBAColor
Auto Trait Implementations§
impl Freeze for RGBAColor
impl RefUnwindSafe for RGBAColor
impl Send for RGBAColor
impl Sync for RGBAColor
impl Unpin for RGBAColor
impl UnwindSafe for RGBAColor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)