# `Color.HSLuv.Gamut`

Helpers that compute the sRGB gamut boundary inside CIELUV for
HSLuv and HPLuv.

These reimplement the reference algorithm from
https://www.hsluv.org/implementations/ (Alexei Boronine) using the
sRGB working-space XYZ→RGB matrix derived by
`Color.RGB.WorkingSpace` from Lindbloom's primaries, so the result
matches our `Color.SRGB` exactly.

# `get_bounds`

Returns the six sRGB gamut boundary lines in CIELUV chroma space for
a given `L`. Each line is `{slope, intercept}` describing
`v = slope * u + intercept` in the chroma plane.

### Arguments

* `l` is the CIELUV lightness.

### Returns

* A list of six `{slope, intercept}` tuples.

# `max_chroma_for_lh`

Returns the maximum chroma achievable inside the sRGB gamut for the
given `(l, h)` in CIELUV coordinates, where `h` is in degrees.

### Arguments

* `l` is the CIELUV lightness.

* `h` is the hue in degrees.

### Returns

* A non-negative float.

# `max_safe_chroma_for_l`

Returns the largest chroma for the given `l` such that HPLuv is still
achromatic at any hue, i.e. the distance from the origin in `uv` to
the *nearest* gamut boundary line.

### Arguments

* `l` is the CIELUV lightness.

### Returns

* A non-negative float.

---

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