Struct nannou_core::prelude::Hsv
source · #[repr(C)]pub struct Hsv<S = Srgb, T = f32>{
pub hue: RgbHue<T>,
pub saturation: T,
pub value: T,
pub space: PhantomData<S>,
}
Expand description
Linear HSV color space.
HSV is a cylindrical version of RGB and it’s very
similar to HSL. The difference is that the value
component in HSV determines the brightness of the color, and not the
lightness. The difference is that, for example, red (100% R, 0% G, 0% B)
and white (100% R, 100% G, 100% B) has the same brightness (or value), but
not the same lightness.
Fields§
§hue: RgbHue<T>
The hue of the color, in degrees. Decides if it’s red, blue, purple, etc.
saturation: T
The colorfulness of the color. 0.0 gives gray scale colors and 1.0 will give absolutely clear colors.
value: T
Decides how bright the color will look. 0.0 will be black, and 1.0 will
give a bright an clear color that goes towards white when saturation
goes towards 0.0.
space: PhantomData<S>
The white point and RGB primaries this color is adapted to. The default is the sRGB standard.
Implementations§
Trait Implementations§
source§impl<S, T> AbsDiffEq for Hsv<S, T>
impl<S, T> AbsDiffEq for Hsv<S, T>
source§fn default_epsilon() -> <Hsv<S, T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Hsv<S, T> as AbsDiffEq>::Epsilon
source§fn abs_diff_eq(
&self,
other: &Hsv<S, T>,
epsilon: <T as AbsDiffEq>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &Hsv<S, T>, epsilon: <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 Hsv<S, T>
impl<S, T> AddAssign<T> for Hsv<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 Hsv<S, T>
impl<S, T> AddAssign for Hsv<S, T>
source§fn add_assign(&mut self, other: Hsv<S, T>)
fn add_assign(&mut self, other: Hsv<S, T>)
+=
operation. Read moresource§impl<'de, S, T> Deserialize<'de> for Hsv<S, T>
impl<'de, S, T> Deserialize<'de> for Hsv<S, T>
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Hsv<S, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Hsv<S, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<S, T, _S> From<Alpha<Luma<_S, T>, T>> for Hsv<S, T>where
T: Component + Float,
S: RgbSpace,
_S: LumaStandard<WhitePoint = <S as RgbSpace>::WhitePoint>,
impl<S, T, _S> From<Alpha<Luma<_S, T>, T>> for Hsv<S, T>where
T: Component + Float,
S: RgbSpace,
_S: LumaStandard<WhitePoint = <S as RgbSpace>::WhitePoint>,
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, _S> From<Hsv<_S, T>> for Alpha<Luma<S, T>, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
impl<S, T, _S> From<Hsv<_S, T>> for Alpha<Luma<S, T>, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
source§impl<S, T, _S> From<Hsv<_S, T>> for Luma<S, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
impl<S, T, _S> From<Hsv<_S, T>> for Luma<S, T>where
T: Component + Float,
S: LumaStandard,
_S: RgbSpace<WhitePoint = <S as LumaStandard>::WhitePoint>,
source§impl<S, T, _S> From<Luma<_S, T>> for Hsv<S, T>where
T: Component + Float,
S: RgbSpace,
_S: LumaStandard<WhitePoint = <S as RgbSpace>::WhitePoint>,
impl<S, T, _S> From<Luma<_S, T>> for Hsv<S, T>where
T: Component + Float,
S: RgbSpace,
_S: LumaStandard<WhitePoint = <S as RgbSpace>::WhitePoint>,
source§impl<S, T> FromColor<<S as RgbSpace>::WhitePoint, T> for Hsv<S, T>
impl<S, T> FromColor<<S as RgbSpace>::WhitePoint, T> for Hsv<S, T>
source§fn from_xyz(color: Xyz<<S as RgbSpace>::WhitePoint, T>) -> Hsv<S, T>
fn from_xyz(color: Xyz<<S as RgbSpace>::WhitePoint, T>) -> Hsv<S, T>
source§impl<S, Wp, T> IntoColor<Wp, T> for Hsv<S, T>
impl<S, Wp, T> IntoColor<Wp, T> for Hsv<S, T>
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§impl<S> IntoLinSrgba<S> for Hsv<Srgb, S>
impl<S> IntoLinSrgba<S> for Hsv<Srgb, S>
source§fn into_lin_srgba(self) -> LinSrgba<S>
fn into_lin_srgba(self) -> LinSrgba<S>
source§impl<S, T> Limited for Hsv<S, T>
impl<S, T> Limited for Hsv<S, T>
source§impl<S, T> PartialEq for Hsv<S, T>
impl<S, T> PartialEq for Hsv<S, T>
source§impl<S, T> Pixel<T> for Hsv<S, T>
impl<S, T> Pixel<T> for Hsv<S, T>
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 Hsv<S, T>
impl<S, T> RelativeEq for Hsv<S, T>
source§fn default_max_relative() -> <Hsv<S, T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <Hsv<S, T> as AbsDiffEq>::Epsilon
source§fn relative_eq(
&self,
other: &Hsv<S, T>,
epsilon: <Hsv<S, T> as AbsDiffEq>::Epsilon,
max_relative: <Hsv<S, T> as AbsDiffEq>::Epsilon
) -> bool
fn relative_eq( &self, other: &Hsv<S, T>, epsilon: <Hsv<S, T> as AbsDiffEq>::Epsilon, max_relative: <Hsv<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 Hsv<S, T>
impl<S, T> Serialize for Hsv<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 Hsv<S, T>
impl<S, T> SubAssign<T> for Hsv<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 Hsv<S, T>
impl<S, T> SubAssign for Hsv<S, T>
source§fn sub_assign(&mut self, other: Hsv<S, T>)
fn sub_assign(&mut self, other: Hsv<S, T>)
-=
operation. Read moresource§impl<S, T> UlpsEq for Hsv<S, T>
impl<S, T> UlpsEq for Hsv<S, T>
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
impl<S, T> Copy for Hsv<S, T>
impl<S, T> StructuralPartialEq for Hsv<S, T>
Auto Trait Implementations§
impl<S, T> RefUnwindSafe for Hsv<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for Hsv<S, T>
impl<S, T> Sync for Hsv<S, T>
impl<S, T> Unpin for Hsv<S, T>
impl<S, T> UnwindSafe for Hsv<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