color_lut — GFX2D post op

Data kinds: nonelut (an op determined by its arguments alone — it takes no image or data input)

Call: import gfx2d; gfx2d.color_lut(size=17, gain=(1.0, 1.0, 1.0), lift=(0.0, 0.0, 0.0), gamma=(1.0, 1.0, 1.0), saturation=1.0) (or opsgfx2d.get("color_lut"))

Usage

Build a 3-D colour LUT, `(n, n, n, 3) indexed [r, g, b]`.

`out = clip(lift + gain * in**gamma)` per channel, then saturation is

applied about the Rec. 709 luma. With all defaults this is the **identity

LUT**, and because trilinear interpolation is exact for a function that is

linear in each variable, :func:color_grade with the identity LUT is the

identity to float64 rounding (measured maximum 3.3e-16 at size 17 and

2.2e-16 at size 2) — the property the suite uses to prove the interpolation

itself is right before testing any grade.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

gfx2d_scenepy -3.11 examples/gfx2d_scene.py

Ops the type connects to (they accept lut as input)

color_grade

Same category (post)

bloom · vignette · chromatic_aberration · film_grain · color_grade · dither · palette_quantize


*Provenance: gfx2d.py — GFX2D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.