-
Notifications
You must be signed in to change notification settings - Fork 714
[css-color-4] Evaluate static gamut mapping algorithms for oklab/oklch spaces #10579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for starting this.
Why Lab and not Oklab, given the hue curvature of Lab (especially in blues, but also in orange to a lesser extent). I agree that mapping to a smoothed gamut boundary may well be better.
That is video luma, right? Where Y is computed without bothering to undo gamma-encoding first? |
Sorry, that was a typo. I fixed up the original comment.
In the experiments that I did (which was not very exhaustive), I was doing this in linear space, but that was just because it was easier to plug into the pipeline at that stage. Another option was to find the nearest point in the L2 sense in YUV space (either linear or gamma encoded). I haven't investigated that thoroughly. |
Ah okay, makes sense.
That makes the calculated lightness accurate, so good. It doesn't make the UV plane perceptually uniform, of course. |
This is clearly seen in CSS Color 4, Figure 2. |
Separating the action item "ccameron: review gamut mapping algorithms" from here 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:
The text was updated successfully, but these errors were encountered: