pub struct Color(/* private fields */);
Implementations§
Source§impl Color
impl Color
pub const TRANSPARENT: Self
pub const BLACK: Self
pub const DARK_GRAY: Self
pub const GRAY: Self
pub const LIGHT_GRAY: Self
pub const WHITE: Self
pub const RED: Self
pub const GREEN: Self
pub const BLUE: Self
pub const YELLOW: Self
pub const CYAN: Self
pub const MAGENTA: Self
pub const fn new(argb: u32) -> Self
pub const fn from_argb(a: u8, r: u8, g: u8, b: u8) -> Color
pub const fn from_rgb(r: u8, g: u8, b: u8) -> Color
pub fn a(self) -> u8
pub fn r(self) -> u8
pub fn g(self) -> u8
pub fn b(self) -> u8
pub fn with_a(self, a: u8) -> Self
pub fn to_rgb(self) -> RGB
pub fn to_hsv(self) -> HSV
Trait Implementations§
Source§impl Pixel for Color
impl Pixel for Color
Source§fn matches_color_type(ct: ColorType) -> bool
fn matches_color_type(ct: ColorType) -> bool
true
if the type matches the color type’s format.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