pub enum Color {
RGB(RGBColor),
ARGB(ARGBColor),
HSV(HSVColor),
Raw([u8; 4]),
}
Variants§
Implementations§
Source§impl Color
impl Color
pub const fn default() -> Self
pub const fn rgb_parts(red: u8, green: u8, blue: u8) -> Self
pub const fn argb_parts(alpha: u8, red: u8, green: u8, blue: u8) -> Self
pub const fn argb_array(arr: &[u8; 4]) -> Self
pub const fn rgb_hex(hex: u32) -> Self
pub const fn argb_hex(hex: u32) -> Self
pub const fn to_rgb(&self) -> Self
pub const fn rgb_values(&self) -> [u8; 3]
pub const fn argb_values(&self) -> [u8; 4]
Trait Implementations§
impl Copy for Color
impl Eq for Color
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 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