# `Color.AdobeRGB`

Adobe RGB (1998) color space, using the Lindbloom Adobe working space
(primaries from Adobe RGB (1998) specification, D65 reference white)
and simple gamma companding with `γ = 2.19921875`.

Channels `r`, `g`, `b` are unit floats in `[0, 1]`.

# `t`

```elixir
@type t() :: %Color.AdobeRGB{
  alpha: number() | nil,
  b: number() | nil,
  g: number() | nil,
  r: number() | nil
}
```

# `from_xyz`

Converts a CIE `XYZ` color (assumed D65/2°) to Adobe RGB.

### Arguments

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

### Returns

* A `Color.AdobeRGB` struct.

### Examples

    iex> xyz = %Color.XYZ{x: 0.95047, y: 1.0, z: 1.08883, illuminant: :D65, observer_angle: 2}
    iex> {:ok, adobe} = Color.AdobeRGB.from_xyz(xyz)
    iex> {Float.round(adobe.r, 3), Float.round(adobe.g, 3), Float.round(adobe.b, 3)}
    {1.0, 1.0, 1.0}

# `to_xyz`

Converts an Adobe RGB color to a CIE `XYZ` color.

### Arguments

* `adobe` is a `Color.AdobeRGB` struct with unit-range channels.

### Returns

* A `Color.XYZ` struct tagged with D65/2°, `Y ∈ [0, 1]`.

### Examples

    iex> {:ok, xyz} = Color.AdobeRGB.to_xyz(%Color.AdobeRGB{r: 1.0, g: 1.0, b: 1.0})
    iex> {Float.round(xyz.x, 4), Float.round(xyz.y, 4), Float.round(xyz.z, 4)}
    {0.9505, 1.0, 1.0888}

---

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