pub struct Rgb24 {
pub r: u8,
pub g: u8,
pub b: u8,
}
Fields§
§r: u8
§g: u8
§b: u8
Implementations§
Source§impl Rgb24
impl Rgb24
pub const fn new(r: u8, g: u8, b: u8) -> Rgb24
pub const fn new_grey(c: u8) -> Rgb24
pub fn floor(self, min: u8) -> Rgb24
pub fn ceil(self, max: u8) -> Rgb24
pub fn to_f32_rgb(self) -> [f32; 3]
pub fn to_f32_rgba(self, alpha: f32) -> [f32; 4]
pub fn saturating_add(self, other: Rgb24) -> Rgb24
pub fn saturating_sub(self, other: Rgb24) -> Rgb24
pub fn saturating_scalar_mul(self, scalar: u32) -> Rgb24
pub fn scalar_div(self, scalar: u32) -> Rgb24
pub fn saturating_scalar_mul_div( self, numerator: u32, denominator: u32, ) -> Rgb24
pub fn normalised_mul(self, other: Rgb24) -> Rgb24
pub fn normalised_scalar_mul(self, scalar: u8) -> Rgb24
Trait Implementations§
Source§impl Ord for Rgb24
impl Ord for Rgb24
Source§impl PartialOrd for Rgb24
impl PartialOrd for Rgb24
impl Copy for Rgb24
impl Eq for Rgb24
impl StructuralPartialEq for Rgb24
Auto Trait Implementations§
impl Freeze for Rgb24
impl RefUnwindSafe for Rgb24
impl Send for Rgb24
impl Sync for Rgb24
impl Unpin for Rgb24
impl UnwindSafe for Rgb24
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