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.
Written as the object, or as CSS hex: "#rgb", "#rgba", "#rrggbb" or
"#rrggbbaa", any case, each digit pair a component times 255. It is
written back as the object: a component need not be a multiple 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§
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 Freeze 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