pub struct Colour {
pub r: u8,
pub g: u8,
pub b: u8,
}
Expand description
A struct to store colour values. Can be created from RGB, HSV or greyscale values, but is ultimately stored as RGB.
Fields§
§r: u8
The red channel of the colour
g: u8
The green channel of the colour
b: u8
The blue channel of the colour
Implementations§
Trait Implementations§
Source§impl AddAssign for Colour
impl AddAssign for Colour
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl MulAssign<f64> for Colour
impl MulAssign<f64> for Colour
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreimpl Copy for Colour
impl Eq for Colour
impl StructuralPartialEq for Colour
Auto Trait Implementations§
impl Freeze for Colour
impl RefUnwindSafe for Colour
impl Send for Colour
impl Sync for Colour
impl Unpin for Colour
impl UnwindSafe for Colour
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