Ogeon / palette

A Rust library for linear color calculations and conversion
Apache License 2.0
749 stars 60 forks source link

Display P3 (and DCI-P3) support #367

Closed marcpabst closed 2 weeks ago

marcpabst commented 8 months ago

Description

I'm looking to implement Display P3 support (and potentially also DCI-P3) - as far as I can see, this should mostly encompass copying the sRGB code and changing the primaries to those of DCI-P3 (as the EOTF is the same as in sRGB). I'm happy to do it, if someone agrees to review and merge it.

Ogeon commented 8 months ago

Hi, this would be a nice addition, seeing how it's at least relevant within the Apple ecosystem. It should be enough to implement the as RGB standards, from what I have seen.

Ogeon commented 8 months ago

Oh and I'll review and merge it, I may just be a bit inactive this coming week or so, to spend time with family and wind down after a busy December.

marcpabst commented 8 months ago

Oh and I'll review and merge it, I may just be a bit inactive this coming week or so, to spend time with family and wind down after a busy December.

That's great to hear! Just wanted to make sure there's interest :) I think both DCI P3 and Display P3 should be fairly easy to add by implementing the DCI P3 primaries, as they both use D65 as the white point and a gamma 2.4 / sRGB EOTF (which I belive are already available in palette)

Merry Chrismas and enjou the time with your family!

marcpabst commented 8 months ago

And while we're at it, we should probably also add other trivially-to-implement and widely-used colour spaces like AdobeRGB (also D65).

Ogeon commented 8 months ago

Sure thing, the only reason why it hasn't happened so far is that nobody has asked for it or championed it. 🙂 If you give this a try, it would be nice if you can have modularity in mind. Shared primaries can be a shared type, for example. I'm just mentioning it since there's not much presence for it in the code so far, but it was the original intent.

Merry Christmas to you too!