Comment

Comment by JyrkiAlakuijala

This looks very similar to what I came up for pik, consequently used as main default colorspace of JPEG XL, i.e., XYB.

Also butteraugli's XYB has similar ideas, but is slightly more expensive to calculate due to the biased logarithm in the compression function (instead of cubic root), but possibly scales better for HDR (say above 200 nits).

JPEG XL's XYB includes more red and less green in S-receptor modeling (for the blue-yellow axis). If I look at literature of LMS receptor spectra, it makes me wonder why there is so much green in Oklab. When I optimized similar for XYB, the optimization would favor adding slightly more red for the S than green.

S component in JPEG XL XYB before non-linearity:

0.24 * R + 0.20 * G + 0.56 * B

S component in Oklab before non-linearity:

0.05 * R + 0.26 * G + 0.63 * B

Given the similarity of Oklab and XYB I suspect (but i'm not completely sure) that JPEG XL's format is powerful enough to model Oklab, too. Very very likely it can perfectly model the M1 matrix and the cubic root. I believe for M2 there may be some need for approximations. There JPEG XL can have local variations for M2 from chroma-from-luma fields, but likely luma needs to be slightly different from Oklab.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton