#[repr(C)]pub struct Color {
pub a: u8,
pub r: u8,
pub g: u8,
pub b: u8,
}Expand description
An 8-bit-per-channel ARGB color.
Fields§
§a: u8§r: u8§g: u8§b: u8Implementations§
Source§impl Color
impl Color
Sourcepub const fn argb(a: u8, r: u8, g: u8, b: u8) -> Self
pub const fn argb(a: u8, r: u8, g: u8, b: u8) -> Self
Creates a color from alpha, red, green, and blue channels.
Sourcepub const fn rgb(r: u8, g: u8, b: u8) -> Self
pub const fn rgb(r: u8, g: u8, b: u8) -> Self
Creates an opaque color from red, green, and blue channels.
Sourcepub const fn transparent() -> Self
pub const fn transparent() -> Self
Returns fully transparent black.
Trait Implementations§
impl Copy for Color
impl Eq for Color
Source§impl From<Color> for ResourceValue
impl From<Color> for ResourceValue
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
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