pub struct Rgba {
pub red: f32,
pub green: f32,
pub blue: f32,
pub alpha: f32,
}Expand description
A straight (not premultiplied), sRGB-encoded color with alpha, each component in 0..=1.
Read from the object or CSS hex ("#rgb", "#rgba", "#rrggbb", "#rrggbbaa", any
case). Always written back as the object, since components need not be multiples of 1/255.
Fields§
§red: f32Red component.
green: f32Green component.
blue: f32Blue component.
alpha: f32Coverage.
Implementations§
Source§impl<'de> Rgba
impl<'de> Rgba
pub fn deserialize<__D>(__deserializer: __D) -> Result<Rgba, __D::Error>where
__D: Deserializer<'de>,
Trait Implementations§
Source§impl AnimatedValue for Rgba
impl AnimatedValue for Rgba
Source§const ACCEPTS_DATA: bool = false
const ACCEPTS_DATA: bool = false
Whether the type takes the
data value mode.Source§const INTERPOLATES: bool = true
const INTERPOLATES: bool = true
Whether keyframes of the type can interpolate; those of the others only hold.
Source§const OFFSETS: bool = false
const OFFSETS: bool = false
Whether two values of the type have a difference to add: what
repeat_offset needs.Source§const VALUE_CURVES: bool = false
const VALUE_CURVES: bool = false
Whether a keyframe of the type can start a value curve (
ValueBezier).Source§const SPLIT: Option<(usize, usize)> = None
const SPLIT: Option<(usize, usize)> = None
The fewest and the most channels the type’s
split mode takes, or None for a type
without the mode.Source§fn takes_value_curve(&self) -> bool
fn takes_value_curve(&self) -> bool
Whether a keyframe holding this value may start or end a value curve.
Source§fn extrapolates(&self, extrapolation: Extrapolation) -> bool
fn extrapolates(&self, extrapolation: Extrapolation) -> bool
Whether keyframes holding this value may extrapolate by
extrapolation.impl Copy for Rgba
Source§impl<'de> Deserialize<'de> for Rgba
impl<'de> Deserialize<'de> for Rgba
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Rgba
Auto Trait Implementations§
impl Forget for Rgba
impl Freeze for Rgba
impl Move for Rgba
impl RefUnwindSafe for Rgba
impl Send for Rgba
impl Sync for Rgba
impl Unpin for Rgba
impl UnsafeUnpin for Rgba
impl UnwindSafe for Rgba
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