[csswg-drafts] [css-color-4] Evaluate static gamut mapping algorithms for oklab/oklch spaces (#10579)

ccameron-chromium has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Evaluate static gamut mapping algorithms for oklab/oklch spaces ==
Separating the action item "ccameron: review gamut mapping algorithms" [from here](https://github.com/w3c/csswg-drafts/issues/9449#issuecomment-2162711081) into a new issue. Tagging in @foolip @LeaVerou @svgeesus for the more limited discussion here (please feel free to include anyone else).

From the linked resolution in the issue, these algorithms are not to be applied to the various RGB spaces. I'd like to scope my comments to just "gamut mapping to apply to oklab/oklch" spaces, since I feel a bit differently about XYZ and Lab spaces (I would want XYZ and Lab to follow RGB, because they are the canonical profile connection spaces used in ICC based color matching, and don't want to mix this discussion with those issues).

The properties that I'd like for the algorithm to apply to just-oklab/oklch are much looser. An iterative algorithm with quadratic convergence is quite fine.

There were lots of algorithms listed in issue 9449, so I'd like to collect a reduced list of candidates here to discuss.

To provide an extremely short list:
* Projecting in Lab to the Rec2020 gamut boundary along constant L
  * This is what's proposed in the spec (modulo termination conditions and iteration method)
  * We can write out the details for an exact solution that quadraticly converges (it's a bit of work, but I can do it if desired)
  * An exact solution for the exact Rec2020 boundary may not be desirable
    * There is some concave nastiness around the blue corner of the gamut that it would be nice to avoid.
    * There is also chrome reduction as discussed in the spec
    * Creating a "nicer-shaped" surface very close to the Rec2020 gamut might be a good solution here
* Projecting in Rec2020 YUV along constant Y
  * This is extremely fast and probably quite good.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10579 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 16 July 2024 15:42:42 UTC