[−][src]Struct nannou::color::Hwb
Linear HWB color space.
HWB is a cylindrical version of RGB and it's very closely related to HSV. It describes colors with a starting hue, then a degree of whiteness and blackness to mix into that base hue.
It is very intuitive for humans to use and many color-pickers are based on the HWB color system
Fields
hue: RgbHue<T>
The hue of the color, in degrees. Decides if it's red, blue, purple, etc. Same as the hue for HSL and HSV.
whiteness: T
The whiteness of the color. It specifies the amount white to mix into the hue. It varies from 0 to 1, with 1 being always full white and 0 always being the color shade (a mixture of a pure hue with black) chosen with the other two controls.
blackness: T
The blackness of the color. It specifies the amount black to mix into the hue. It varies from 0 to 1, with 1 being always full black and 0 always being the color tint (a mixture of a pure hue with white) chosen with the other two
Methods
impl<T> Hwb<T> where
T: Float,
[src]
T: Float,
Trait Implementations
impl<T> IntoColor<T> for Hwb<T> where
T: Float,
[src]
T: Float,
fn into_xyz(self) -> Xyz<T>
[src]
fn into_yxy(self) -> Yxy<T>
[src]
fn into_lab(self) -> Lab<T>
[src]
fn into_lch(self) -> Lch<T>
[src]
fn into_rgb(self) -> Rgb<T>
[src]
fn into_hsl(self) -> Hsl<T>
[src]
fn into_hsv(self) -> Hsv<T>
[src]
fn into_luma(self) -> Luma<T>
[src]
fn into_hwb(self) -> Hwb<T>
[src]
Convert into HWB color space
impl<T> ApproxEq for Hwb<T> where
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Copy,
<T as ApproxEq>::Epsilon: Float,
[src]
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Copy,
<T as ApproxEq>::Epsilon: Float,
type Epsilon = <T as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <Hwb<T> as ApproxEq>::Epsilon
[src]
fn default_max_relative() -> <Hwb<T> as ApproxEq>::Epsilon
[src]
fn default_max_ulps() -> u32
[src]
fn relative_eq(
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_relative: <Hwb<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_relative: <Hwb<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_eq(
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
fn relative_ne(
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_relative: <Hwb<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_relative: <Hwb<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_ne(
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Hwb<T>,
epsilon: <Hwb<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
impl<T> From<Hsl<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Lch<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Hsv<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Yxy<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Lch<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Yxy<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Color<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Lch<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Lab<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Lab<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hsv<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Yxy<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Rgb<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Lab<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Xyz<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Rgb<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Luma<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hsv<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Color<T> where
T: Float,
[src]
T: Float,
impl<T> From<Lab<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Yxy<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Lch<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hwb<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Xyz<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Xyz<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Luma<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Hsv<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Rgb<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Hsl<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Rgb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Xyz<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Alpha<Hsl<T>, T> where
T: Float,
[src]
T: Float,
impl<T> From<Luma<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> From<Hwb<T>> for Luma<T> where
T: Float,
[src]
T: Float,
impl<T> From<Alpha<Hsl<T>, T>> for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> Limited for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> Default for Hwb<T> where
T: Float,
[src]
T: Float,
impl<T> FromColor<T> for Hwb<T> where
T: Float,
[src]
T: Float,
fn from_xyz(xyz: Xyz<T>) -> Hwb<T>
[src]
fn from_hsv(hsv: Hsv<T>) -> Hwb<T>
[src]
fn from_hwb(hwb: Hwb<T>) -> Hwb<T>
[src]
fn from_yxy(inp: Yxy<T>) -> Self
[src]
Convert from Yxy color space
fn from_lab(inp: Lab<T>) -> Self
[src]
Convert from Lab* color space
fn from_lch(inp: Lch<T>) -> Self
[src]
Convert from LCh° color space
fn from_rgb(inp: Rgb<T>) -> Self
[src]
Convert from RGB color space
fn from_hsl(inp: Hsl<T>) -> Self
[src]
Convert from HSL color space
fn from_luma(inp: Luma<T>) -> Self
[src]
Convert from Luma
impl<T> Shade for Hwb<T> where
T: Float,
[src]
T: Float,
type Scalar = T
The type of the lighten/darken amount.
fn lighten(&self, amount: T) -> Hwb<T>
[src]
fn darken(&self, amount: Self::Scalar) -> Self
[src]
Darken the color by amount
.
impl<T> Debug for Hwb<T> where
T: Debug + Float,
[src]
T: Debug + Float,
impl<T> Copy for Hwb<T> where
T: Copy + Float,
[src]
T: Copy + Float,
impl<T> Mix for Hwb<T> where
T: Float,
[src]
T: Float,
type Scalar = T
The type of the mixing factor.
fn mix(&self, other: &Hwb<T>, factor: T) -> Hwb<T>
[src]
impl<T> PartialEq<Hwb<T>> for Hwb<T> where
T: PartialEq<T> + Float,
[src]
T: PartialEq<T> + Float,
impl<T> Add<T> for Hwb<T> where
T: Float,
[src]
T: Float,
type Output = Hwb<T>
The resulting type after applying the +
operator.
fn add(self, c: T) -> Hwb<T>
[src]
impl<T> Add<Hwb<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
type Output = Hwb<T>
The resulting type after applying the +
operator.
fn add(self, other: Hwb<T>) -> Hwb<T>
[src]
impl<T> Hue for Hwb<T> where
T: Float,
[src]
T: Float,
fn with_hue(&self, hue: RgbHue<T>) -> Hwb<T>
[src]
fn shift_hue(&self, amount: RgbHue<T>) -> Hwb<T>
[src]
impl<T> Sub<T> for Hwb<T> where
T: Float,
[src]
T: Float,
type Output = Hwb<T>
The resulting type after applying the -
operator.
fn sub(self, c: T) -> Hwb<T>
[src]
impl<T> Sub<Hwb<T>> for Hwb<T> where
T: Float,
[src]
T: Float,
type Output = Hwb<T>
The resulting type after applying the -
operator.
fn sub(self, other: Hwb<T>) -> Hwb<T>
[src]
impl<T> GetHue for Hwb<T> where
T: Float,
[src]
T: Float,
type Hue = RgbHue<T>
The kind of hue unit this color space uses. Read more
fn get_hue(&self) -> Option<RgbHue<T>>
[src]
impl<T> Clone for Hwb<T> where
T: Clone + Float,
[src]
T: Clone + Float,
fn clone(&self) -> Hwb<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S> IntoRgba<S> for Hwb<S> where
S: Float + One,
[src]
S: Float + One,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.