# `Color.Tristimulus`

Authoritative source of illuminant reference white data.

This module is the single source of truth for every CIE illuminant
the library supports — `:A`, `:B`, `:C`, `:D50`, `:D55`, `:D65`,
`:D75`, `:E`, `:F2`, `:F7`, `:F11`, plus the LED, ID and DCI series
— and for the two CIE standard observer angles (`2` and `10`). It
is consulted by:

* `Color.XYZ.adapt/3` — chromatic adaptation between illuminants.

* `Color.RGB.WorkingSpace` — when computing the RGB→XYZ matrix for
  a working space, the illuminant's reference white feeds the
  Lindbloom primary-scaling step.

* `Color.Lab`, `Color.Luv`, `Color.LCHab`, `Color.LCHuv`,
  `Color.XyY` — every CIE-tagged colour space converts to XYZ
  relative to its illuminant's reference white.

* `Color.Spectral` — the integration normaliser uses the
  illuminant SPDs from `Color.Spectral.Tables`, which are paired
  with the chromaticities defined here.

Reference whites for the 11 most common illuminants at the 2°
observer come directly from Bruce Lindbloom's tables and are
reproduced exactly. The remaining illuminants are computed from
CIE 1931 / CIE 1964 chromaticities.

All values are returned as plain lists or tuples of `float()`
— the module has no `Nx` dependency.

# `illuminants`

# `observer_angles`

```elixir
@spec observer_angles() :: [2 | 10]
```

Returns the supported CIE standard observer angles.

### Examples

    iex> Color.Tristimulus.observer_angles()
    [2, 10]

# `reference_white`

Returns the reference white for an illuminant as a three-element list
`[Xr, Yr, Zr]` of floats.

### Arguments

* `options` is a keyword list.

### Options

* `:illuminant` defaults to `:D65`.

* `:observer_angle` defaults to `2`.

### Returns

* A list of three floats.

# `reference_white_tuple`

Returns the reference white for an illuminant as an `{Xr, Yr, Zr}` tuple
of plain floats, suitable for feeding into `Color.Conversion.Lindbloom`.

### Arguments

* `options` is a keyword list.

### Options

* `:illuminant` is the illuminant atom (for example `:D65`, `:D50`).
  Defaults to `:D65`.

* `:observer_angle` is the observer angle in degrees, `2` or `10`.
  Defaults to `2`.

### Returns

* An `{Xr, Yr, Zr}` tuple of floats.

### Examples

    iex> Color.Tristimulus.reference_white_tuple(illuminant: :D65)
    {0.95047, 1.0, 1.08883}

# `tristimulus`

# `tristimulus`

# `validate_illuminant`

# `validate_observer_angle`

---

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