# Color Response — model sources and attribution

Color math and UI use the project's existing MIT-licensed code. The new tool
models SDR sRGB, with no claim of reference ACES or Blender AgX equivalence.

## Analytic models

- **clip-v1:** independent linear-channel clamp.
- **reinhard-channel-v1:** independent x/(1+x), applied per channel. Not the full
  photographic operator with scene statistics or white-point control.
- **narkowicz-2016-v1:** [Krzysztof Narkowicz, ACES Filmic Tone Mapping Curve](https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/).
  Five-constant rational fit, without an additional exposure multiplier. Source
  made available under CC0 or MIT. Preserve the distinction from full ACES.
- **wrensch-6th-default-2025-v1:** [Benjamin Wrensch, Minimal AgX Implementation](https://iolite-engine.com/blog_posts/minimal_agx_implementation),
  retrieved 2026-09-16. Sixth-degree polynomial, default look, published inset and
  outset, log bounds −12.47393 / 4.026069, output power 2.2. This version identifier
  is local to Color Response, not an upstream release identifier. The page's
  changelog includes 2025 updates. A source snapshot with its license lives at
  `tests/reference/agx-minimal.glsl`, and its SHA-256 is recorded with the fixtures.
  Values originate from [Troy Sobotka's AgX](https://github.com/sobotka/AgX).

AgX adaptation: define the black-input log floor and guard negative values before
raising to a fractional power. Report both log-domain limiting and the negative
output guard. Clamp final linear channels before standard sRGB encoding. The two
blue-column inset coefficients use the published values, correcting the earlier
Collapse module's transcription. The original hidden Collapse demo is retained
as historical source; Color Response uses the new engine.

## Minimal AgX license

MIT License

Copyright (c) 2024 Missing Deadlines (Benjamin Wrensch)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Color Collapse (Option B): ACES display-transform LUTs

`js/aces-luts.js` is generated using OpenColorIO **2.5.2** and its built-in configs:

- ACES 1: `studio-config-v2.2.0_aces-v1.3_ocio-v2.4`, view `ACES 1.0 - SDR Video`.
- ACES 2: `studio-config-v4.0.0_aces-v2.0_ocio-v2.5`, views
  `ACES 2.0 - SDR 100 nits (Rec.709)` and `ACES 2.0 - SDR 100 nits (P3 D65)`.

Each has separate linear Rec.709 → sRGB and linear P3-D65 → Display P3 tables.
They are sampled approximations, not the old Narkowicz scalar curve and not exact
runtime OCIO evaluation. `tests/reference/generate-aces-luts.py` records the source
config, display, view, shaper, quantization, and table hash. See
[implementation and validation notes](docs/color-response-b.md).

Upstream projects and licenses:

- [OpenColorIO 2.5](https://opencolorio.readthedocs.io/en/latest/releases/ocio_2_5.html)
  and [source](https://github.com/AcademySoftwareFoundation/OpenColorIO).
  [Bundled license](licenses/OpenColorIO-LICENSE.txt).
- [OpenColorIO Config ACES](https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES).
  [Bundled license](licenses/OpenColorIO-Config-ACES-LICENSE.txt).
- [ACES output-transform documentation](https://docs.acescentral.com/system-components/output-transforms/).
- P3/Rec.709 primary conversion follows
  [W3C CSS Color 4 sample conversion matrices](https://www.w3.org/TR/css-color-4/#color-conversion-code).

The previous authored film-inspired option was removed from Color Collapse in
response to product feedback. It is not part of the current tool or its exports.

## Color Collapse: direct Khronos and OpenDRT implementations

- **Khronos PBR Neutral**: Copyright 2024 The Khronos Group Inc., Apache-2.0.
  Reference `PBR_Neutral/pbrNeutral.glsl`, revision
  `f5dc101149fc5c85c0f9852fe2ba438853e8a7d1` of
  [KhronosGroup/ToneMapping](https://github.com/KhronosGroup/ToneMapping).
  `js/khronos-neutral.js` is a JavaScript adaptation modified 2026-09-17.
  The official domain is nonnegative linear Rec.709; the P3-primary application
  is a labeled extension. See [license](licenses/Khronos-Apache-2.0.txt).
- **OpenDRT v1.1.0**: Written by Jed Smith, GPL-3.0.
  [Official release](https://github.com/jedypod/open-display-transform/releases/tag/v1.1.0).
  `js/opendrt.js` is an adaptation modified 2026-09-17, fixing the Standard look
  at 100 nits, 10-nit grey, D65 creative white and bright surround. All active
  Standard hue/purity operations are retained. Input is linear Rec.709 or P3-D65.
  Display-linear output uses the sRGB transfer function for browser display,
  instead of the reference preset's pure 2.2 encoding. See
  [license](licenses/OpenDRT-GPL-3.0.txt) and
  [combined distribution terms](COLOR-COLLAPSE-LICENSE.md).

Both evaluate direct equations, without baking another LUT. Unmodified reference
sources are retained in `tests/reference/`. The independent native float32
harness checks the JavaScript float64 adaptations; it is not a claim of
bit-identical rendering on every Resolve GPU/backend or every OpenDRT preset.
