Struct nannou_core::color::rgb::Rgb
source · #[repr(C)]pub struct Rgb<S = Srgb, T = f32>where
S: RgbStandard,
T: Component,{
pub red: T,
pub green: T,
pub blue: T,
pub standard: PhantomData<S>,
}
Expand description
Generic RGB.
RGB is probably the most common color space, when it comes to computer graphics, and it’s defined as an additive mixture of red, green and blue light, where gray scale colors are created when these three channels are equal in strength.
Many conversions and operations on this color space requires that it’s
linear, meaning that gamma correction is required when converting to and
from a displayable RGB, such as sRGB. See the pixel
module for encoding formats.
Fields§
§red: T
The amount of red light, where 0.0 is no red light and 1.0f (or 255u8) is the highest displayable amount.
green: T
The amount of green light, where 0.0 is no green light and 1.0f (or 255u8) is the highest displayable amount.
blue: T
The amount of blue light, where 0.0 is no blue light and 1.0f (or 255u8) is the highest displayable amount.
standard: PhantomData<S>
The kind of RGB standard. sRGB is the default.
Implementations§
source§impl<S, T> Rgb<S, T>where
S: RgbStandard,
T: Component,
impl<S, T> Rgb<S, T>where
S: RgbStandard,
T: Component,
sourcepub fn into_format<U>(self) -> Rgb<S, U>where
U: Component,
pub fn into_format<U>(self) -> Rgb<S, U>where
U: Component,
Convert into another component type.
sourcepub fn from_format<U>(color: Rgb<S, U>) -> Rgb<S, T>where
U: Component,
pub fn from_format<U>(color: Rgb<S, U>) -> Rgb<S, T>where
U: Component,
Convert from another component type.
sourcepub fn into_components(self) -> (T, T, T)
pub fn into_components(self) -> (T, T, T)
Convert to a (red, green, blue)
tuple.
sourcepub fn from_components(_: (T, T, T)) -> Rgb<S, T>
pub fn from_components(_: (T, T, T)) -> Rgb<S, T>
Convert from a (red, green, blue)
tuple.
source§impl<S, T> Rgb<S, T>
impl<S, T> Rgb<S, T>
sourcepub fn into_linear(self) -> Rgb<Linear<<S as RgbStandard>::Space>, T>
pub fn into_linear(self) -> Rgb<Linear<<S as RgbStandard>::Space>, T>
Convert the color to linear RGB.
sourcepub fn from_linear(
color: Rgb<Linear<<S as RgbStandard>::Space>, T>
) -> Rgb<S, T>
pub fn from_linear( color: Rgb<Linear<<S as RgbStandard>::Space>, T> ) -> Rgb<S, T>
Convert linear RGB to nonlinear RGB.
sourcepub fn into_encoding<St>(self) -> Rgb<St, T>
pub fn into_encoding<St>(self) -> Rgb<St, T>
Convert the color to a different encoding.
sourcepub fn from_encoding<St>(color: Rgb<St, T>) -> Rgb<S, T>
pub fn from_encoding<St>(color: Rgb<St, T>) -> Rgb<S, T>
Convert RGB from a different encoding.
Trait Implementations§
source§impl<S, T> AbsDiffEq for Rgb<S, T>
impl<S, T> AbsDiffEq for Rgb<S, T>
source§fn default_epsilon() -> <Rgb<S, T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Rgb<S, T> as AbsDiffEq>::Epsilon
source§fn abs_diff_eq(
&self,
other: &Rgb<S, T>,
epsilon: <Rgb<S, T> as AbsDiffEq>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &Rgb<S, T>, epsilon: <Rgb<S, T> as AbsDiffEq>::Epsilon ) -> bool
§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
ApproxEq::abs_diff_eq
.source§impl<S, T> AddAssign<T> for Rgb<S, T>
impl<S, T> AddAssign<T> for Rgb<S, T>
source§fn add_assign(&mut self, c: T)
fn add_assign(&mut self, c: T)
+=
operation. Read moresource§impl<S, T> AddAssign for Rgb<S, T>
impl<S, T> AddAssign for Rgb<S, T>
source§fn add_assign(&mut self, other: Rgb<S, T>)
fn add_assign(&mut self, other: Rgb<S, T>)
+=
operation. Read moresource§impl<S, T> Blend for Rgb<S, T>
impl<S, T> Blend for Rgb<S, T>
source§fn into_premultiplied(self) -> PreAlpha<Rgb<S, T>, T>
fn into_premultiplied(self) -> PreAlpha<Rgb<S, T>, T>
source§fn from_premultiplied(color: PreAlpha<Rgb<S, T>, T>) -> Rgb<S, T>
fn from_premultiplied(color: PreAlpha<Rgb<S, T>, T>) -> Rgb<S, T>
source§fn blend<F>(self, destination: Self, blend_function: F) -> Selfwhere
F: BlendFunction<Self::Color>,
fn blend<F>(self, destination: Self, blend_function: F) -> Selfwhere
F: BlendFunction<Self::Color>,
destination
, using
blend_function
. Anything that implements BlendFunction
is
acceptable, including functions and closures. Read moresource§fn over(self, other: Self) -> Self
fn over(self, other: Self) -> Self
self
over other
. This is the good old common alpha
composition equation.source§fn inside(self, other: Self) -> Self
fn inside(self, other: Self) -> Self
self
that overlaps the visible parts of
other
.source§fn outside(self, other: Self) -> Self
fn outside(self, other: Self) -> Self
self
that lies outside the visible parts of
other
.source§fn plus(self, other: Self) -> Self
fn plus(self, other: Self) -> Self
self
and other
. This uses the alpha component to regulate the
effect, so it’s not just plain component wise addition.source§fn multiply(self, other: Self) -> Self
fn multiply(self, other: Self) -> Self
self
with other
. This uses the alpha component to regulate
the effect, so it’s not just plain component wise multiplication.source§fn screen(self, other: Self) -> Self
fn screen(self, other: Self) -> Self
self
or other
.source§fn overlay(self, other: Self) -> Self
fn overlay(self, other: Self) -> Self
self
or other
if other is dark, or screen them if other
is light. This results in an S curve.source§fn dodge(self, other: Self) -> Self
fn dodge(self, other: Self) -> Self
other
to reflect self
. Results in other
if self
is
black.source§fn burn(self, other: Self) -> Self
fn burn(self, other: Self) -> Self
other
to reflect self
. Results in other
if self
is
white.source§fn hard_light(self, other: Self) -> Self
fn hard_light(self, other: Self) -> Self
self
or other
if other is dark, or screen them if self
is light. This is similar to overlay
, but depends on self
instead
of other
.source§fn soft_light(self, other: Self) -> Self
fn soft_light(self, other: Self) -> Self
other
if self
is light, or darken other
as if it’s burned
if self
is dark. The effect is increased if the components of self
is further from 0.5.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
self
and other
. It’s
basically abs(self - other)
, but regulated by the alpha component.source§impl<S, T> ComponentWise for Rgb<S, T>where
S: RgbStandard,
T: Component,
impl<S, T> ComponentWise for Rgb<S, T>where
S: RgbStandard,
T: Component,
source§impl<'de, S, T> Deserialize<'de> for Rgb<S, T>
impl<'de, S, T> Deserialize<'de> for Rgb<S, T>
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Rgb<S, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Rgb<S, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<S, T> DivAssign<T> for Rgb<S, T>
impl<S, T> DivAssign<T> for Rgb<S, T>
source§fn div_assign(&mut self, c: T)
fn div_assign(&mut self, c: T)
/=
operation. Read moresource§impl<S, T> DivAssign for Rgb<S, T>
impl<S, T> DivAssign for Rgb<S, T>
source§fn div_assign(&mut self, other: Rgb<S, T>)
fn div_assign(&mut self, other: Rgb<S, T>)
/=
operation. Read moresource§impl<S, T> From<Alpha<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
impl<S, T> From<Alpha<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
source§fn from(
color: Alpha<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>
) -> Rgb<S, T>
fn from( color: Alpha<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T> ) -> Rgb<S, T>
source§impl<S, T> From<Alpha<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
impl<S, T> From<Alpha<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
source§fn from(
color: Alpha<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>
) -> Rgb<S, T>
fn from( color: Alpha<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T> ) -> Rgb<S, T>
source§impl<S, T, _S> From<Alpha<Luma<_S, T>, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
_S: LumaStandard<WhitePoint = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
impl<S, T, _S> From<Alpha<Luma<_S, T>, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
_S: LumaStandard<WhitePoint = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
source§impl<S, T> From<Alpha<Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
impl<S, T> From<Alpha<Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
source§fn from(
color: Alpha<Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>
) -> Rgb<S, T>
fn from( color: Alpha<Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T> ) -> Rgb<S, T>
source§impl<S, T> From<Alpha<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
impl<S, T> From<Alpha<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>> for Rgb<S, T>
source§fn from(
color: Alpha<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T>
) -> Rgb<S, T>
fn from( color: Alpha<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>, T> ) -> Rgb<S, T>
source§impl<S, T, Sp, Wp> From<Hsl<Sp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
Sp: RgbSpace<WhitePoint = Wp>,
impl<S, T, Sp, Wp> From<Hsl<Sp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
Sp: RgbSpace<WhitePoint = Wp>,
source§impl<S, T, Sp, Wp> From<Hsv<Sp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
Sp: RgbSpace<WhitePoint = Wp>,
impl<S, T, Sp, Wp> From<Hsv<Sp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
Sp: RgbSpace<WhitePoint = Wp>,
source§impl<S, T> From<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
impl<S, T> From<Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
source§fn from(
color: Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>
) -> Rgb<S, T>
fn from( color: Lab<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> ) -> Rgb<S, T>
source§impl<S, T> From<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
impl<S, T> From<Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
source§fn from(
color: Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>
) -> Rgb<S, T>
fn from( color: Lch<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> ) -> Rgb<S, T>
source§impl<S, T, St, Wp> From<Luma<St, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
St: LumaStandard<WhitePoint = Wp>,
impl<S, T, St, Wp> From<Luma<St, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
St: LumaStandard<WhitePoint = Wp>,
source§impl<Wp, T, S> From<Rgb<S, T>> for Xyz<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
S: RgbStandard,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, S> From<Rgb<S, T>> for Xyz<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
S: RgbStandard,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Lab<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Lab<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Lch<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Lch<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<S, T, _S> From<Rgb<_S, T>> for Alpha<Luma<S, T>, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
impl<S, T, _S> From<Rgb<_S, T>> for Alpha<Luma<S, T>, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Xyz<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Xyz<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Yxy<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Alpha<Yxy<Wp, T>, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Lab<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Lab<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Lch<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Lch<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<S, T, _S> From<Rgb<_S, T>> for Luma<S, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
impl<S, T, _S> From<Rgb<_S, T>> for Luma<S, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
source§impl<Wp, T, _S> From<Rgb<_S, T>> for Yxy<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<Wp, T, _S> From<Rgb<_S, T>> for Yxy<Wp, T>where
T: Component + Float,
Wp: WhitePoint,
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<S, Wp, T> From<Xyz<Wp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<S, Wp, T> From<Xyz<Wp, T>> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§impl<S, T> From<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
impl<S, T> From<Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>> for Rgb<S, T>
source§fn from(
color: Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>
) -> Rgb<S, T>
fn from( color: Yxy<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> ) -> Rgb<S, T>
source§impl<S, T> FromColor<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> for Rgb<S, T>
impl<S, T> FromColor<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> for Rgb<S, T>
source§fn from_xyz(
color: Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>
) -> Rgb<S, T>
fn from_xyz( color: Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T> ) -> Rgb<S, T>
source§fn from_luma(
color: Luma<Linear<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint>, T>
) -> Rgb<S, T>
fn from_luma( color: Luma<Linear<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint>, T> ) -> Rgb<S, T>
source§impl<S, T, Wp> IntoColor<Wp, T> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
impl<S, T, Wp> IntoColor<Wp, T> for Rgb<S, T>where
S: RgbStandard,
T: Component + Float,
Wp: WhitePoint,
<S as RgbStandard>::Space: RgbSpace<WhitePoint = Wp>,
source§fn into_rgb<Sp>(self) -> Rgb<Linear<Sp>, T>where
Sp: RgbSpace<WhitePoint = Wp>,
fn into_rgb<Sp>(self) -> Rgb<Linear<Sp>, T>where
Sp: RgbSpace<WhitePoint = Wp>,
source§fn into_hsl<Sp>(self) -> Hsl<Sp, T>where
Sp: RgbSpace<WhitePoint = Wp>,
fn into_hsl<Sp>(self) -> Hsl<Sp, T>where
Sp: RgbSpace<WhitePoint = Wp>,
source§fn into_hsv<Sp>(self) -> Hsv<Sp, T>where
Sp: RgbSpace<WhitePoint = Wp>,
fn into_hsv<Sp>(self) -> Hsv<Sp, T>where
Sp: RgbSpace<WhitePoint = Wp>,
source§impl<S, T> Limited for Rgb<S, T>where
S: RgbStandard,
T: Component,
impl<S, T> Limited for Rgb<S, T>where
S: RgbStandard,
T: Component,
source§impl<S, T> MulAssign<T> for Rgb<S, T>
impl<S, T> MulAssign<T> for Rgb<S, T>
source§fn mul_assign(&mut self, c: T)
fn mul_assign(&mut self, c: T)
*=
operation. Read moresource§impl<S, T> MulAssign for Rgb<S, T>
impl<S, T> MulAssign for Rgb<S, T>
source§fn mul_assign(&mut self, other: Rgb<S, T>)
fn mul_assign(&mut self, other: Rgb<S, T>)
*=
operation. Read moresource§impl<S, T> PartialEq for Rgb<S, T>
impl<S, T> PartialEq for Rgb<S, T>
source§impl<S, T> Pixel<T> for Rgb<S, T>where
S: RgbStandard,
T: Component,
impl<S, T> Pixel<T> for Rgb<S, T>where
S: RgbStandard,
T: Component,
source§fn as_raw_mut<P>(&mut self) -> &mut P
fn as_raw_mut<P>(&mut self) -> &mut P
source§fn into_raw<P>(self) -> Pwhere
P: RawPixelSized<T>,
fn into_raw<P>(self) -> Pwhere
P: RawPixelSized<T>,
source§fn from_raw_mut<P>(pixel: &mut P) -> &mut Self
fn from_raw_mut<P>(pixel: &mut P) -> &mut Self
source§fn from_raw_slice(slice: &[T]) -> &[Self]
fn from_raw_slice(slice: &[T]) -> &[Self]
source§fn from_raw_slice_mut(slice: &mut [T]) -> &mut [Self]
fn from_raw_slice_mut(slice: &mut [T]) -> &mut [Self]
source§impl<S, T> RelativeEq for Rgb<S, T>
impl<S, T> RelativeEq for Rgb<S, T>
source§fn default_max_relative() -> <Rgb<S, T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <Rgb<S, T> as AbsDiffEq>::Epsilon
source§fn relative_eq(
&self,
other: &Rgb<S, T>,
epsilon: <Rgb<S, T> as AbsDiffEq>::Epsilon,
max_relative: <Rgb<S, T> as AbsDiffEq>::Epsilon
) -> bool
fn relative_eq( &self, other: &Rgb<S, T>, epsilon: <Rgb<S, T> as AbsDiffEq>::Epsilon, max_relative: <Rgb<S, T> as AbsDiffEq>::Epsilon ) -> bool
§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool
ApproxEq::relative_eq
.source§impl<S, T> Serialize for Rgb<S, T>
impl<S, T> Serialize for Rgb<S, T>
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl<S, T> SubAssign<T> for Rgb<S, T>
impl<S, T> SubAssign<T> for Rgb<S, T>
source§fn sub_assign(&mut self, c: T)
fn sub_assign(&mut self, c: T)
-=
operation. Read moresource§impl<S, T> SubAssign for Rgb<S, T>
impl<S, T> SubAssign for Rgb<S, T>
source§fn sub_assign(&mut self, other: Rgb<S, T>)
fn sub_assign(&mut self, other: Rgb<S, T>)
-=
operation. Read moresource§impl<S, T> UlpsEq for Rgb<S, T>
impl<S, T> UlpsEq for Rgb<S, T>
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
impl<S, T> Copy for Rgb<S, T>where
S: RgbStandard,
T: Component,
impl<S, T> StructuralPartialEq for Rgb<S, T>where
S: RgbStandard,
T: Component,
Auto Trait Implementations§
impl<S, T> RefUnwindSafe for Rgb<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Rgb<S, T>
impl<S, T> Sync for Rgb<S, T>
impl<S, T> Unpin for Rgb<S, T>
impl<S, T> UnwindSafe for Rgb<S, T>where
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for Dwhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
S: IntoColor<Swp, T>,
D: FromColor<Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for Dwhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
S: IntoColor<Swp, T>,
D: FromColor<Dwp, T>,
source§fn adapt_from_using<M>(color: S, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_from_using<M>(color: S, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
source§fn adapt_from(color: S) -> Self
fn adapt_from(color: S) -> Self
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
source§impl<T, U> ConvertFrom<T> for U
impl<T, U> ConvertFrom<T> for U
source§fn convert_from(t: T) -> U
fn convert_from(t: T) -> U
source§fn try_convert_from(t: T) -> Result<U, OutOfBounds<U>>
fn try_convert_from(t: T) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains the unclamped color. Read moresource§fn convert_unclamped_from(val: T) -> Self
fn convert_unclamped_from(val: T) -> Self
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains the unclamped color. Read more