# Struct nannou::color::RgbHue[−][src]

#[repr(C)]
pub struct RgbHue<T = f32>(_)
where
T: Float
;

A hue type for the RGB family of color spaces.

It’s measured in degrees and uses the three additive primaries red, green and blue.

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.

## Implementations

### impl<T> RgbHue<T> where    T: Float, [src]

#### pub fn from_degrees(degrees: T) -> RgbHue<T>[src]

Create a new hue from 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> AbsDiffEq<RgbHue<T>> for RgbHue<T> where    T: Float + AbsDiffEq<T>,    <T as AbsDiffEq<T>>::Epsilon: Float, [src]

#### type Epsilon = <T as AbsDiffEq<T>>::Epsilon

Used for specifying relative comparisons.

### impl<T> Add<RgbHue<T>> for RgbHue<T> where    T: Float, [src]

#### type Output = RgbHue<T>

The resulting type after applying the + operator.

### impl<T> Add<T> for RgbHue<T> where    T: Float, [src]

#### type Output = RgbHue<T>

The resulting type after applying the + operator.

### impl<T> Sub<RgbHue<T>> for RgbHue<T> where    T: Float, [src]

#### type Output = RgbHue<T>

The resulting type after applying the - operator.

### impl<T> Sub<T> for RgbHue<T> where    T: Float, [src]

#### type Output = RgbHue<T>

The resulting type after applying the - operator.

## Blanket Implementations

### impl<T> Pointable for T

#### type Init = T

The type for initializers.

### impl<T> ToOwned for T where    T: Clone, [src]

#### type Owned = T

The resulting type after obtaining ownership.

### impl<T, U> TryFrom<U> for T where    U: Into<T>, [src]

#### type Error = Infallible

The type returned in the event of a conversion error.

### impl<T, U> TryInto<U> for T where    U: TryFrom<T>, [src]

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.