Struct palette::luma::Luma [−][src]
#[repr(C)]pub struct Luma<S = Srgb, T = f32> where
T: Component,
S: LumaStandard, { pub luma: T, pub standard: PhantomData<S>, }
Luminance.
Luma is a purely gray scale color space, which is included more for
completeness than anything else, and represents how bright a color is
perceived to be. It’s basically the Y
component of CIE
XYZ. The lack of any form of hue representation limits
the set of operations that can be performed on it.
Fields
luma: T
The lightness of the color. 0.0 is black and 1.0 is white.
standard: PhantomData<S>
The kind of RGB standard. sRGB is the default.
Implementations
impl<S, T> Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> Luma<S, T> where
T: Component,
S: LumaStandard,
[src]pub fn new(luma: T) -> Luma<S, T>
[src]
Create a luminance color.
pub fn into_format<U>(self) -> Luma<S, U> where
U: Component + FromComponent<T>,
[src]
U: Component + FromComponent<T>,
Convert into another component type.
pub fn from_format<U>(color: Luma<S, U>) -> Self where
U: Component,
T: FromComponent<U>,
[src]
U: Component,
T: FromComponent<U>,
Convert from another component type.
pub fn into_components(self) -> (T,)
[src]
Convert to a (luma,)
tuple.
pub fn from_components((luma): (T,)) -> Self
[src]
Convert from a (luma,)
tuple.
pub fn min_luma() -> T
[src]
Return the luma
value minimum.
pub fn max_luma() -> T
[src]
Return the luma
value maximum.
impl<S, T> Luma<S, T> where
T: FloatComponent,
S: LumaStandard,
[src]
impl<S, T> Luma<S, T> where
T: FloatComponent,
S: LumaStandard,
[src]pub fn into_linear(self) -> Luma<Linear<S::WhitePoint>, T>
[src]
Convert the color to linear luminance.
pub fn from_linear(color: Luma<Linear<S::WhitePoint>, T>) -> Luma<S, T>
[src]
Convert linear luminance to nonlinear luminance.
pub fn into_encoding<St: LumaStandard<WhitePoint = S::WhitePoint>>(
self
) -> Luma<St, T>
[src]
self
) -> Luma<St, T>
Convert the color to a different encoding.
pub fn from_encoding<St: LumaStandard<WhitePoint = S::WhitePoint>>(
color: Luma<St, T>
) -> Luma<S, T>
[src]
color: Luma<St, T>
) -> Luma<S, T>
Convert luminance from a different encoding.
Trait Implementations
impl<S, T> AbsDiffEq<Luma<S, T>> for Luma<S, T> where
T: Component + AbsDiffEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]
impl<S, T> AbsDiffEq<Luma<S, T>> for Luma<S, T> where
T: Component + AbsDiffEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]type Epsilon = T::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
[src]
pub fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
impl<S, T> Add<Luma<S, T>> for Luma<S, T> where
T: Component + Add,
S: LumaStandard<TransferFn = LinearFn>,
<T as Add>::Output: Component,
[src]
impl<S, T> Add<Luma<S, T>> for Luma<S, T> where
T: Component + Add,
S: LumaStandard<TransferFn = LinearFn>,
<T as Add>::Output: Component,
[src]impl<S, T> Add<T> for Luma<S, T> where
T: Component + Add,
S: LumaStandard<TransferFn = LinearFn>,
<T as Add>::Output: Component,
[src]
impl<S, T> Add<T> for Luma<S, T> where
T: Component + Add,
S: LumaStandard<TransferFn = LinearFn>,
<T as Add>::Output: Component,
[src]impl<S, T> AddAssign<Luma<S, T>> for Luma<S, T> where
T: Component + AddAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> AddAssign<Luma<S, T>> for Luma<S, T> where
T: Component + AddAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn add_assign(&mut self, other: Luma<S, T>)
[src]
impl<S, T> AddAssign<T> for Luma<S, T> where
T: Component + AddAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> AddAssign<T> for Luma<S, T> where
T: Component + AddAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn add_assign(&mut self, c: T)
[src]
impl<S, T, P: ?Sized> AsMut<P> for Luma<S, T> where
T: Component,
S: LumaStandard,
P: RawPixel<T>,
[src]
impl<S, T, P: ?Sized> AsMut<P> for Luma<S, T> where
T: Component,
S: LumaStandard,
P: RawPixel<T>,
[src]impl<S, T, P: ?Sized> AsRef<P> for Luma<S, T> where
T: Component,
S: LumaStandard,
P: RawPixel<T>,
[src]
impl<S, T, P: ?Sized> AsRef<P> for Luma<S, T> where
T: Component,
S: LumaStandard,
P: RawPixel<T>,
[src]impl<S, T> Blend for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> Blend for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]type Color = Luma<S, T>
The core color type. Typically Self
for color types without alpha.
fn into_premultiplied(self) -> PreAlpha<Luma<S, T>, T>
[src]
fn from_premultiplied(color: PreAlpha<Luma<S, T>, T>) -> Self
[src]
fn blend<F>(self, destination: Self, blend_function: F) -> Self where
F: BlendFunction<Self::Color>,
[src]
F: BlendFunction<Self::Color>,
fn over(self, other: Self) -> Self
[src]
fn inside(self, other: Self) -> Self
[src]
fn outside(self, other: Self) -> Self
[src]
fn atop(self, other: Self) -> Self
[src]
fn xor(self, other: Self) -> Self
[src]
fn plus(self, other: Self) -> Self
[src]
fn multiply(self, other: Self) -> Self
[src]
fn screen(self, other: Self) -> Self
[src]
fn overlay(self, other: Self) -> Self
[src]
fn darken(self, other: Self) -> Self
[src]
fn lighten(self, other: Self) -> Self
[src]
fn dodge(self, other: Self) -> Self
[src]
fn burn(self, other: Self) -> Self
[src]
fn hard_light(self, other: Self) -> Self
[src]
fn soft_light(self, other: Self) -> Self
[src]
fn difference(self, other: Self) -> Self
[src]
fn exclusion(self, other: Self) -> Self
[src]
impl<S, T> Clamp for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> Clamp for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]fn is_within_bounds(&self) -> bool
[src]
fn clamp(&self) -> Luma<S, T>
[src]
fn clamp_self(&mut self)
[src]
impl<S, T> Clone for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> Clone for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]impl<S, T> ComponentWise for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> ComponentWise for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]type Scalar = T
The scalar type for color components.
fn component_wise<F: FnMut(T, T) -> T>(
&self,
other: &Luma<S, T>,
f: F
) -> Luma<S, T>
[src]
&self,
other: &Luma<S, T>,
f: F
) -> Luma<S, T>
fn component_wise_self<F: FnMut(T) -> T>(&self, f: F) -> Luma<S, T>
[src]
impl<S, T> Default for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> Default for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]impl<S, T> Div<Luma<S, T>> for Luma<S, T> where
T: Component + Div,
S: LumaStandard<TransferFn = LinearFn>,
<T as Div>::Output: Component,
[src]
impl<S, T> Div<Luma<S, T>> for Luma<S, T> where
T: Component + Div,
S: LumaStandard<TransferFn = LinearFn>,
<T as Div>::Output: Component,
[src]impl<S, T> Div<T> for Luma<S, T> where
T: Component + Div,
S: LumaStandard<TransferFn = LinearFn>,
<T as Div>::Output: Component,
[src]
impl<S, T> Div<T> for Luma<S, T> where
T: Component + Div,
S: LumaStandard<TransferFn = LinearFn>,
<T as Div>::Output: Component,
[src]impl<S, T> DivAssign<Luma<S, T>> for Luma<S, T> where
T: Component + DivAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> DivAssign<Luma<S, T>> for Luma<S, T> where
T: Component + DivAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn div_assign(&mut self, other: Luma<S, T>)
[src]
impl<S, T> DivAssign<T> for Luma<S, T> where
T: Component + DivAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> DivAssign<T> for Luma<S, T> where
T: Component + DivAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn div_assign(&mut self, c: T)
[src]
impl<S, T, _C, _A> FromColorUnclamped<Alpha<_C, _A>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
_C: IntoColorUnclamped<Self>,
_A: Component,
[src]
impl<S, T, _C, _A> FromColorUnclamped<Alpha<_C, _A>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
_C: IntoColorUnclamped<Self>,
_A: Component,
[src]fn from_color_unclamped(color: Alpha<_C, _A>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Hsl<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Hsl<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]fn from_color_unclamped(color: Hsl<_S, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Hsluv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Hsluv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]fn from_color_unclamped(color: Hsluv<S::WhitePoint, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Hsv<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Hsv<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]fn from_color_unclamped(color: Hsv<_S, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Hwb<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Hwb<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]fn from_color_unclamped(color: Hwb<_S, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Lab<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Lab<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]fn from_color_unclamped(color: Lab<S::WhitePoint, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Lch<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Lch<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]fn from_color_unclamped(color: Lch<S::WhitePoint, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Lchuv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Lchuv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]fn from_color_unclamped(color: Lchuv<S::WhitePoint, T>) -> Self
[src]
impl<Wp, T, S> FromColorUnclamped<Luma<S, T>> for Xyz<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, S> FromColorUnclamped<Luma<S, T>> for Xyz<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<S, T>) -> Self
[src]
impl<T, S> FromColorUnclamped<Luma<S, T>> for Yxy<S::WhitePoint, T> where
T: FloatComponent,
S: LumaStandard,
[src]
impl<T, S> FromColorUnclamped<Luma<S, T>> for Yxy<S::WhitePoint, T> where
T: FloatComponent,
S: LumaStandard,
[src]fn from_color_unclamped(luma: Luma<S, T>) -> Self
[src]
impl<S1, S2, T> FromColorUnclamped<Luma<S2, T>> for Luma<S1, T> where
S1: LumaStandard,
S2: LumaStandard<WhitePoint = S1::WhitePoint>,
T: FloatComponent,
[src]
impl<S1, S2, T> FromColorUnclamped<Luma<S2, T>> for Luma<S1, T> where
S1: LumaStandard,
S2: LumaStandard<WhitePoint = S1::WhitePoint>,
T: FloatComponent,
[src]fn from_color_unclamped(color: Luma<S2, T>) -> Self
[src]
impl<S, St, T> FromColorUnclamped<Luma<St, T>> for Rgb<S, T> where
S: RgbStandard,
St: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
T: FloatComponent,
[src]
impl<S, St, T> FromColorUnclamped<Luma<St, T>> for Rgb<S, T> where
S: RgbStandard,
St: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
T: FloatComponent,
[src]fn from_color_unclamped(color: Luma<St, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsl<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsl<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsluv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsluv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsv<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hsv<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hwb<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Luma<_S, T>> for Hwb<S, T> where
T: FloatComponent,
S: RgbStandard,
T: FloatComponent,
T: FloatComponent,
_S: LumaStandard<WhitePoint = <S::Space as RgbSpace>::WhitePoint>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lab<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lab<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lch<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lch<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lchuv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Lchuv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Luv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]
impl<Wp, T, _S> FromColorUnclamped<Luma<_S, T>> for Luv<Wp, T> where
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
Wp: WhitePoint,
T: FloatComponent,
_S: LumaStandard<WhitePoint = Wp>,
[src]fn from_color_unclamped(color: Luma<_S, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Luv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Luv<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
[src]fn from_color_unclamped(color: Luv<S::WhitePoint, T>) -> Self
[src]
impl<S, T, _S> FromColorUnclamped<Rgb<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]
impl<S, T, _S> FromColorUnclamped<Rgb<_S, T>> for Luma<S, T> where
T: Component,
S: LumaStandard,
T: FloatComponent,
T: FloatComponent,
_S: RgbStandard,
_S::Space: RgbSpace<WhitePoint = S::WhitePoint>,
[src]fn from_color_unclamped(color: Rgb<_S, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Xyz<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
S: LumaStandard,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Xyz<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
S: LumaStandard,
T: FloatComponent,
[src]fn from_color_unclamped(color: Xyz<S::WhitePoint, T>) -> Self
[src]
impl<S, T> FromColorUnclamped<Yxy<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
S: LumaStandard,
T: FloatComponent,
[src]
impl<S, T> FromColorUnclamped<Yxy<<S as LumaStandard>::WhitePoint, T>> for Luma<S, T> where
S: LumaStandard,
T: FloatComponent,
[src]fn from_color_unclamped(color: Yxy<S::WhitePoint, T>) -> Self
[src]
impl<S, T> Mix for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> Mix for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]impl<S, T> Mul<Luma<S, T>> for Luma<S, T> where
T: Component + Mul,
S: LumaStandard<TransferFn = LinearFn>,
<T as Mul>::Output: Component,
[src]
impl<S, T> Mul<Luma<S, T>> for Luma<S, T> where
T: Component + Mul,
S: LumaStandard<TransferFn = LinearFn>,
<T as Mul>::Output: Component,
[src]impl<S, T> Mul<T> for Luma<S, T> where
T: Component + Mul,
S: LumaStandard<TransferFn = LinearFn>,
<T as Mul>::Output: Component,
[src]
impl<S, T> Mul<T> for Luma<S, T> where
T: Component + Mul,
S: LumaStandard<TransferFn = LinearFn>,
<T as Mul>::Output: Component,
[src]impl<S, T> MulAssign<Luma<S, T>> for Luma<S, T> where
T: Component + MulAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> MulAssign<Luma<S, T>> for Luma<S, T> where
T: Component + MulAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn mul_assign(&mut self, other: Luma<S, T>)
[src]
impl<S, T> MulAssign<T> for Luma<S, T> where
T: Component + MulAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> MulAssign<T> for Luma<S, T> where
T: Component + MulAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn mul_assign(&mut self, c: T)
[src]
impl<S, T> PartialEq<Luma<S, T>> for Luma<S, T> where
T: Component + PartialEq,
S: LumaStandard,
[src]
impl<S, T> PartialEq<Luma<S, T>> for Luma<S, T> where
T: Component + PartialEq,
S: LumaStandard,
[src]impl<S, T> Pixel<T> for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
impl<S, T> Pixel<T> for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]const CHANNELS: usize
[src]
fn as_raw<P: RawPixel<T> + ?Sized>(&self) -> &P
[src]
fn as_raw_mut<P: RawPixel<T> + ?Sized>(&mut self) -> &mut P
[src]
fn into_raw<P: RawPixelSized<T>>(self) -> P
[src]
fn from_raw<P: RawPixel<T> + ?Sized>(pixel: &P) -> &Self
[src]
fn from_raw_mut<P: RawPixel<T> + ?Sized>(pixel: &mut P) -> &mut Self
[src]
fn from_raw_slice(slice: &[T]) -> &[Self]
[src]
fn from_raw_slice_mut(slice: &mut [T]) -> &mut [Self]
[src]
fn into_raw_slice(slice: &[Self]) -> &[T]
[src]
fn into_raw_slice_mut(slice: &mut [Self]) -> &mut [T]
[src]
impl<S, T> RelativeContrast for Luma<S, T> where
T: FloatComponent,
S: LumaStandard,
[src]
impl<S, T> RelativeContrast for Luma<S, T> where
T: FloatComponent,
S: LumaStandard,
[src]type Scalar = T
The type of the contrast ratio.
fn get_contrast_ratio(&self, other: &Self) -> T
[src]
fn has_min_contrast_text(&self, other: &Self) -> bool
[src]
fn has_min_contrast_large_text(&self, other: &Self) -> bool
[src]
fn has_enhanced_contrast_text(&self, other: &Self) -> bool
[src]
fn has_enhanced_contrast_large_text(&self, other: &Self) -> bool
[src]
fn has_min_contrast_graphics(&self, other: &Self) -> bool
[src]
impl<S, T> RelativeEq<Luma<S, T>> for Luma<S, T> where
T: Component + RelativeEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]
impl<S, T> RelativeEq<Luma<S, T>> for Luma<S, T> where
T: Component + RelativeEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]fn default_max_relative() -> Self::Epsilon
[src]
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
pub fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<S, T> Shade for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> Shade for Luma<S, T> where
T: FloatComponent,
S: LumaStandard<TransferFn = LinearFn>,
[src]impl<S, T> Sub<Luma<S, T>> for Luma<S, T> where
T: Component + Sub,
S: LumaStandard<TransferFn = LinearFn>,
<T as Sub>::Output: Component,
[src]
impl<S, T> Sub<Luma<S, T>> for Luma<S, T> where
T: Component + Sub,
S: LumaStandard<TransferFn = LinearFn>,
<T as Sub>::Output: Component,
[src]impl<S, T> Sub<T> for Luma<S, T> where
T: Component + Sub,
S: LumaStandard<TransferFn = LinearFn>,
<T as Sub>::Output: Component,
[src]
impl<S, T> Sub<T> for Luma<S, T> where
T: Component + Sub,
S: LumaStandard<TransferFn = LinearFn>,
<T as Sub>::Output: Component,
[src]impl<S, T> SubAssign<Luma<S, T>> for Luma<S, T> where
T: Component + SubAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> SubAssign<Luma<S, T>> for Luma<S, T> where
T: Component + SubAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn sub_assign(&mut self, other: Luma<S, T>)
[src]
impl<S, T> SubAssign<T> for Luma<S, T> where
T: Component + SubAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]
impl<S, T> SubAssign<T> for Luma<S, T> where
T: Component + SubAssign,
S: LumaStandard<TransferFn = LinearFn>,
[src]fn sub_assign(&mut self, c: T)
[src]
impl<S, T> UlpsEq<Luma<S, T>> for Luma<S, T> where
T: Component + UlpsEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]
impl<S, T> UlpsEq<Luma<S, T>> for Luma<S, T> where
T: Component + UlpsEq,
T::Epsilon: Copy,
S: LumaStandard + PartialEq,
[src]impl<S, T, _A> WithAlpha<_A> for Luma<S, T> where
T: Component,
S: LumaStandard,
_A: Component,
[src]
impl<S, T, _A> WithAlpha<_A> for Luma<S, T> where
T: Component,
S: LumaStandard,
_A: Component,
[src]type Color = Self
The opaque color type, without any transparency. Read more
type WithAlpha = Alpha<Self, _A>
The color type with transparency applied. Read more
fn with_alpha(self, alpha: _A) -> Self::WithAlpha
[src]
fn without_alpha(self) -> Self::Color
[src]
fn split(self) -> (Self::Color, _A)
[src]
fn opaque(self) -> Self::WithAlpha
[src]
fn transparent(self) -> Self::WithAlpha
[src]
impl<S, T> Copy for Luma<S, T> where
T: Component,
S: LumaStandard,
[src]
T: Component,
S: LumaStandard,
impl<S, T> Eq for Luma<S, T> where
T: Component + Eq,
S: LumaStandard,
[src]
T: Component + Eq,
S: LumaStandard,
Auto Trait Implementations
impl<S, T> RefUnwindSafe for Luma<S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Luma<S, T> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<S, T> Sync for Luma<S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<S, T> Unpin for Luma<S, T> where
S: Unpin,
T: Unpin,
S: Unpin,
T: Unpin,
impl<S, T> UnwindSafe for Luma<S, T> where
S: UnwindSafe,
T: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for D where
T: FloatComponent,
S: IntoColorUnclamped<Xyz<Swp, T>>,
Swp: WhitePoint,
Dwp: WhitePoint,
D: FromColorUnclamped<Xyz<Dwp, T>>,
[src]
impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for D where
T: FloatComponent,
S: IntoColorUnclamped<Xyz<Swp, T>>,
Swp: WhitePoint,
Dwp: WhitePoint,
D: FromColorUnclamped<Xyz<Dwp, T>>,
[src]pub fn adapt_from_using<M>(S, M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_from(color: S) -> Self
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
[src]
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
[src]pub fn adapt_into_using<M>(Self, M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T, U> FromColor<T> for U where
U: FromColorUnclamped<T> + Clamp,
[src]
impl<T, U> FromColor<T> for U where
U: FromColorUnclamped<T> + Clamp,
[src]pub fn from_color(T) -> U
[src]
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
[src]
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
[src]pub fn into_color(Self) -> U
[src]
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
[src]
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
[src]pub fn into_color_unclamped(Self) -> U
[src]
impl<T, U> TryFromColor<T> for U where
U: FromColorUnclamped<T> + Clamp,
[src]
impl<T, U> TryFromColor<T> for U where
U: FromColorUnclamped<T> + Clamp,
[src]pub fn try_from_color(T) -> Result<U, OutOfBounds<U>>
[src]
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
[src]
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
[src]