pub struct RGB { /* private fields */ }
Implementations
sourceimpl RGB
impl RGB
pub fn sum(self) -> f64
pub fn gray(self) -> f64
pub fn luma1(self) -> f64
pub fn luma2(self) -> f64
pub fn min_element(self) -> f64
pub fn max_element(self) -> f64
pub fn is_finite(self) -> bool
pub fn is_nan(self) -> bool
pub fn is_infinite(self) -> bool
pub fn clamp(self, min: Self, max: Self) -> Self
pub fn min(self, rhs: Self) -> Self
pub fn max(self, rhs: Self) -> Self
pub fn abs(self) -> Self
pub fn round(self) -> Self
pub fn floor(self) -> Self
pub fn ceil(self) -> Self
pub fn trunc(self) -> Self
pub fn fract(self) -> Self
pub fn sqrt(self) -> Self
pub fn exp(self) -> Self
pub fn exp2(self) -> Self
pub fn ln(self) -> Self
pub fn log(self, base: f64) -> Self
pub fn log2(self) -> Self
pub fn log10(self) -> Self
pub fn cbrt(self) -> Self
pub fn powf(self, n: f64) -> Self
pub fn sin(self) -> Self
pub fn cos(self) -> Self
pub fn tan(self) -> Self
pub fn sin_cos(self) -> (Self, Self)
pub fn recip(self) -> Self
pub fn saturate(self) -> Self
pub fn lerp(self, rhs: Self, s: f64) -> Self
pub fn gamma_correct(self) -> Self
sourceimpl RGB
impl RGB
pub fn to_array(self) -> [f64; 3]
pub fn to_tuple(self) -> (f64, f64, f64)
pub fn to_rgbf(self) -> RGBf
pub fn to_rgba(self) -> RGBA
pub fn to_rgba_alpha(self, alpha: f64) -> RGBA
pub fn to_rgbaf(self) -> RGBAf
pub fn to_rgbaf_alpha(self, alpha: f32) -> RGBAf
pub fn to_rgb24(self) -> RGB24
pub fn to_rgba32(self) -> RGBA32
pub fn to_rgba32_alpha(self, alpha: u8) -> RGBA32
Trait Implementations
sourceimpl AddAssign<RGB> for RGB
impl AddAssign<RGB> for RGB
sourcefn add_assign(&mut self, rhs: RGB)
fn add_assign(&mut self, rhs: RGB)
Performs the +=
operation. Read more
sourceimpl AddAssign<f64> for RGB
impl AddAssign<f64> for RGB
sourcefn add_assign(&mut self, rhs: f64)
fn add_assign(&mut self, rhs: f64)
Performs the +=
operation. Read more
sourceimpl DivAssign<RGB> for RGB
impl DivAssign<RGB> for RGB
sourcefn div_assign(&mut self, rhs: RGB)
fn div_assign(&mut self, rhs: RGB)
Performs the /=
operation. Read more
sourceimpl DivAssign<f64> for RGB
impl DivAssign<f64> for RGB
sourcefn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the /=
operation. Read more
sourceimpl MulAssign<RGB> for RGB
impl MulAssign<RGB> for RGB
sourcefn mul_assign(&mut self, rhs: RGB)
fn mul_assign(&mut self, rhs: RGB)
Performs the *=
operation. Read more
sourceimpl MulAssign<f64> for RGB
impl MulAssign<f64> for RGB
sourcefn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the *=
operation. Read more
sourceimpl SubAssign<RGB> for RGB
impl SubAssign<RGB> for RGB
sourcefn sub_assign(&mut self, rhs: RGB)
fn sub_assign(&mut self, rhs: RGB)
Performs the -=
operation. Read more
sourceimpl SubAssign<f64> for RGB
impl SubAssign<f64> for RGB
sourcefn sub_assign(&mut self, rhs: f64)
fn sub_assign(&mut self, rhs: f64)
Performs the -=
operation. Read more
impl Copy for RGB
impl StructuralPartialEq for RGB
Auto Trait Implementations
impl RefUnwindSafe for RGB
impl Send for RGB
impl Sync for RGB
impl Unpin for RGB
impl UnwindSafe for RGB
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more