# `Color.LCHuv`

Cylindrical representation of CIE `L*u*v*`: lightness, chroma, hue.

The `h` hue is expressed in degrees in `[0, 360)`.

# `t`

```elixir
@type t() :: %Color.LCHuv{
  alpha: number() | nil,
  c: number() | nil,
  h: number() | nil,
  illuminant: atom(),
  l: number() | nil,
  observer_angle: 2 | 10
}
```

# `from_luv`

Converts an `L*u*v*` color to `LCHuv`.

### Arguments

* `luv` is a `Color.Luv` struct.

### Returns

* A `Color.LCHuv` struct.

### Examples

    iex> luv = %Color.Luv{l: 50.0, u: 0.0, v: 0.0}
    iex> {:ok, lch} = Color.LCHuv.from_luv(luv)
    iex> {lch.l, lch.c, lch.h}
    {50.0, 0.0, 0.0}

# `from_xyz`

Converts a CIE `XYZ` color to `LCHuv` via `L*u*v*`.

### Arguments

* `xyz` is a `Color.XYZ` struct.

### Returns

* A `Color.LCHuv` struct.

# `to_luv`

Converts an `LCHuv` color to `L*u*v*`.

### Arguments

* `lch` is a `Color.LCHuv` struct.

### Returns

* A `Color.Luv` struct.

### Examples

    iex> {:ok, luv} = Color.LCHuv.to_luv(%Color.LCHuv{l: 50.0, c: 0.0, h: 0.0})
    iex> {luv.l, luv.u, luv.v}
    {50.0, 0.0, 0.0}

# `to_xyz`

Converts an `LCHuv` color to CIE `XYZ` via `L*u*v*`.

### Arguments

* `lch` is a `Color.LCHuv` struct.

### Returns

* A `Color.XYZ` struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
