[−][src]Struct amethyst_rendy::palette::LabHue
A hue type for the CIE L*a*b* family of color spaces.
It's measured in degrees and it's based on the four physiological elementary colors red, yellow, green and blue. This makes it different from the hue of RGB based color spaces.
The hue is a circular type, where 0
and 360
is the same, and
it's normalized to (-180, 180]
when it's converted to a linear
number (like f32
). This makes many calculations easier, but may
also have some surprising effects if it's expected to act as a
linear number.
Methods
impl<T> LabHue<T> where
T: Float,
[src]
T: Float,
pub fn from_degrees(degrees: T) -> LabHue<T>
[src]
Create a new hue from degrees.
pub fn from_radians(radians: T) -> LabHue<T>
[src]
Create a new hue from radians, instead of degrees.
pub fn to_degrees(self) -> T
[src]
Get the hue as degrees, in the range (-180, 180]
.
pub fn to_radians(self) -> T
[src]
Convert the hue to radians, in the range (-π, π]
.
pub fn to_positive_degrees(self) -> T
[src]
Convert the hue to positive degrees, in the range [0, 360)
.
pub fn to_positive_radians(self) -> T
[src]
Convert the hue to positive radians, in the range [0, 2π)
.
pub fn to_raw_degrees(self) -> T
[src]
Get the internal representation, without normalizing it.
pub fn to_raw_radians(self) -> T
[src]
Get the internal representation as radians, without normalizing it.
Trait Implementations
impl<T> Default for LabHue<T> where
T: Default + Float,
[src]
T: Default + Float,
impl<T> Copy for LabHue<T> where
T: Copy + Float,
[src]
T: Copy + Float,
impl<T> Clone for LabHue<T> where
T: Clone + Float,
[src]
T: Clone + Float,
fn clone(&self) -> LabHue<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'de, T> Deserialize<'de> for LabHue<T> where
T: Float + Deserialize<'de>,
[src]
T: Float + Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<LabHue<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<LabHue<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> PartialEq<LabHue<T>> for LabHue<T> where
T: Float,
[src]
T: Float,
fn eq(&self, other: &LabHue<T>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T> PartialEq<T> for LabHue<T> where
T: Float,
[src]
T: Float,
fn eq(&self, other: &T) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T> Add<T> for LabHue<T> where
T: Float,
[src]
T: Float,
type Output = LabHue<T>
The resulting type after applying the +
operator.
fn add(self, other: T) -> LabHue<T>
[src]
impl<T> Add<LabHue<T>> for LabHue<T> where
T: Float,
[src]
T: Float,
type Output = LabHue<T>
The resulting type after applying the +
operator.
fn add(self, other: LabHue<T>) -> LabHue<T>
[src]
impl<T> Sub<LabHue<T>> for LabHue<T> where
T: Float,
[src]
T: Float,
type Output = LabHue<T>
The resulting type after applying the -
operator.
fn sub(self, other: LabHue<T>) -> LabHue<T>
[src]
impl<T> Sub<T> for LabHue<T> where
T: Float,
[src]
T: Float,
type Output = LabHue<T>
The resulting type after applying the -
operator.
fn sub(self, other: T) -> LabHue<T>
[src]
impl Into<f32> for LabHue<f64>
[src]
impl Into<f32> for LabHue<f32>
[src]
impl Into<f64> for LabHue<f64>
[src]
impl<T> ApproxEq for LabHue<T> where
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Float,
[src]
T: ApproxEq + Float,
<T as ApproxEq>::Epsilon: Float,
type Epsilon = <T as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <LabHue<T> as ApproxEq>::Epsilon
[src]
fn default_max_relative() -> <LabHue<T> as ApproxEq>::Epsilon
[src]
fn default_max_ulps() -> u32
[src]
fn relative_eq(
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_relative: <LabHue<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_relative: <LabHue<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_eq(
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
fn relative_ne(
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_relative: <LabHue<T> as ApproxEq>::Epsilon
) -> bool
[src]
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_relative: <LabHue<T> as ApproxEq>::Epsilon
) -> bool
fn ulps_ne(
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &LabHue<T>,
epsilon: <LabHue<T> as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
impl<T> Debug for LabHue<T> where
T: Debug + Float,
[src]
T: Debug + Float,
impl<T> From<T> for LabHue<T> where
T: Float,
[src]
T: Float,
impl<T> Serialize for LabHue<T> where
T: Float + Serialize,
[src]
T: Float + Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl<T> Unpin for LabHue<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for LabHue<T> where
T: Sync,
T: Sync,
impl<T> Send for LabHue<T> where
T: Send,
T: Send,
impl<T> UnwindSafe for LabHue<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for LabHue<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
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> From<T> for 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<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
Convert the source color to the destination color using the bradford method by default Read more
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Supports<T> for T
[src]
impl<T> Erased for T
[src]
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
[src]
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Resource for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any,
[src]
T: Any,
fn get_type_id(&self) -> TypeId
[src]
impl<T> TryDefault for T where
T: Default,
[src]
T: Default,
fn try_default() -> Result<T, String>
[src]
fn unwrap_default() -> Self
[src]
Calls try_default
and panics on an error case.
impl<T> Event for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<T> Config for T where
T: Deserialize<'a> + Serialize + Default,
[src]
T: Deserialize<'a> + Serialize + Default,
fn load<P>(path: P) -> T where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
fn load_no_fallback<P>(path: P) -> Result<T, ConfigError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
fn load_bytes(bytes: &[u8]) -> Result<T, ConfigError>
[src]
fn write<P>(&self, path: P) -> Result<(), ConfigError> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,