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

Calculating mean runtime over 100 iterations gives similar speed ranking:

- CSS **39.285**ms
- CSS Rec2020 **37.438**ms
- Raytrace **25.618**ms
- Scale LH **21.532**ms
- Björn Ottosson **12.361**ms
- Chromium **10.203**ms
- Edge Seeker **7.488**ms
- Clip **5.062**ms

The [code for edge seeker](https://github.com/color-js/apps/blob/main/gamut-mapping/edge-seeker/makeEdgeSeeker.js)  calculates the maximum chroma for a given lightness and hue. The gamut slice is approximated with a linear segment for the lower (dark) part and an arc for the upper (light) part. This implementation populates a 400-element LUT.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10579#issuecomment-2944947184 using your GitHub account


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

Received on Thursday, 5 June 2025 15:14:35 UTC