pub struct Rgba {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}Expand description
RGBA colour (0-255 per channel).
Fields§
§r: u8§g: u8§b: u8§a: u8Implementations§
Source§impl Rgba
impl Rgba
Sourcepub const SEMI_BLACK: Self
pub const SEMI_BLACK: Self
Semi-transparent black (for background boxes).
Sourcepub fn blend_over(&self, bg: &Rgba) -> Rgba
pub fn blend_over(&self, bg: &Rgba) -> Rgba
Blend this colour over a background colour using alpha compositing.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rgba
impl<'de> Deserialize<'de> for Rgba
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Rgba
impl Eq for Rgba
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