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

```#[repr(C)]pub struct Lab<Wp = D65, T = f32> where    T: Component + Float,    Wp: WhitePoint,  {
pub l: T,
pub a: T,
pub b: T,
pub white_point: PhantomData<Wp>,
}```

The CIE L*a*b* (CIELAB) color space.

CIE L*a*b* is a device independent color space which includes all perceivable colors. It’s sometimes used to convert between other color spaces, because of its ability to represent all of their colors, and sometimes in color manipulation, because of its perceptual uniformity. This means that the perceptual difference between two colors is equal to their numerical difference.

The parameters of L*a*b* are quite different, compared to many other color spaces, so manipulating them manually may be unintuitive.

## Fields

`l: T`

L* is the lightness of the color. 0.0 gives absolute black and 100 give the brightest white.

`a: T`

a* goes from red at -128 to green at 127.

`b: T`

b* goes from yellow at -128 to blue at 127.

`white_point: PhantomData<Wp>`

The white point associated with the color’s illuminant and observer. D65 for 2 degree observer is used by default.

## Implementations

### `impl<T> Lab<D65, T> where    T: Component + Float, `[src]

#### `pub fn new(l: T, a: T, b: T) -> Lab<D65, T>`[src]

CIE L*a*b* with white point D65.

### `impl<Wp, T> Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

CIE L*a*b*.

#### `pub fn into_components(self) -> (T, T, T)`[src]

Convert to a `(L\*, a\*, b\*)` tuple.

#### `pub fn from_components((T, T, T)) -> Lab<Wp, T>`[src]

Convert from a `(L\*, a\*, b\*)` tuple.

## Trait Implementations

### `impl<Wp, T> AbsDiffEq<Lab<Wp, T>> for Lab<Wp, T> where    T: Component + Float + AbsDiffEq<T>,    Wp: WhitePoint + PartialEq<Wp>,    <T as AbsDiffEq<T>>::Epsilon: Copy,    <T as AbsDiffEq<T>>::Epsilon: Float, `[src]

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

Used for specifying relative comparisons.

### `impl<Wp, T> Add<Lab<Wp, T>> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `+` operator.

### `impl<Wp, T> Add<T> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `+` operator.

### `impl<Wp, T> ComponentWise for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Scalar = T`

The scalar type for color components.

### `impl<Wp, T> Div<Lab<Wp, T>> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `/` operator.

### `impl<Wp, T> Div<T> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `/` operator.

### `impl<Wp, T> GetHue for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Hue = LabHue<T>`

The kind of hue unit this color space uses. Read more

### `impl<Wp, T> Mix for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Scalar = T`

The type of the mixing factor.

### `impl<Wp, T> Mul<Lab<Wp, T>> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `*` operator.

### `impl<Wp, T> Mul<T> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `*` operator.

### `impl<Wp, T> Shade for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Scalar = T`

The type of the lighten/darken amount.

### `impl<Wp, T> Sub<Lab<Wp, T>> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, T>`

The resulting type after applying the `-` operator.

### `impl<Wp, T> Sub<T> for Lab<Wp, T> where    T: Component + Float,    Wp: WhitePoint, `[src]

#### `type Output = Lab<Wp, 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.