pub struct Color32(pub u32);
Tuple Fields§
§0: u32
Implementations§
Source§impl Color32
impl Color32
pub fn new(val: u32) -> Self
pub fn from_argb(alpha: u8, red: u8, green: u8, blue: u8) -> Self
pub fn alpha(self) -> u8
pub fn red(self) -> u8
pub fn green(self) -> u8
pub fn blue(self) -> u8
pub fn opacity(self) -> f32
pub fn with_alpha(self, alpha: u8) -> Self
pub fn with_opacity(self, opacity: f32) -> Self
pub fn mul_opacity(self, opacity: f32) -> Self
pub fn lerp(self, other: Self, ratio: f32) -> Self
Trait Implementations§
impl Copy for Color32
impl Eq for Color32
impl StructuralPartialEq for Color32
Auto Trait Implementations§
impl Freeze for Color32
impl RefUnwindSafe for Color32
impl Send for Color32
impl Sync for Color32
impl Unpin for Color32
impl UnwindSafe for Color32
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)