Fields
r: u8
g: u8
b: u8
a: u8
Implementations
sourceimpl Color
impl Color
pub const fn RGB(r: u8, g: u8, b: u8) -> Color
pub const fn RGBA(r: u8, g: u8, b: u8, a: u8) -> Color
pub fn to_u32(self, format: &PixelFormat) -> u32
pub fn from_u32(format: &PixelFormat, pixel: u32) -> Color
pub fn invert(self) -> Color
pub const fn rgb(self) -> (u8, u8, u8)
pub const fn rgba(self) -> (u8, u8, u8, u8)
pub const WHITE: Color
pub const BLACK: Color
pub const GRAY: Color
pub const GREY: Color
pub const RED: Color
pub const GREEN: Color
pub const BLUE: Color
pub const MAGENTA: Color
pub const YELLOW: Color
pub const CYAN: Color
Trait Implementations
impl Copy for Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more