nvkelso / color-oracle

color-oracle-mac
MIT License
123 stars 12 forks source link

MacOS is no longer gamma 1.8 #18

Open Myndex opened 1 year ago

Myndex commented 1 year ago

Hello,

I was just reviewing a couple things and I noticed that it looks like the gamma exponent being used here is 1.8. That is the MacOS legacy gamma prior to Snow Leopard. MacOS went to sRGB (nominally 2.2) since Snow Leopard, so 2.2 would be more correct (and there is a piecewise transfer curve for sRGB, though it is computationally more expensive).

Also, the transform matrix for display-P3 is a little different than sRGB, let me know if you'd be interested in supporting display-P3? Display-P3 uses the sRGB TRC, but the primaries have different coordinates, resulting in a different transform matrix to LMS.

nvkelso commented 1 year ago

Thanks for the report!

Can you submit at PR with fixes?