Skip to content
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

Add the ACES2065-1 color space #124

Merged
merged 5 commits into from
Jan 7, 2025
Merged

Add the ACES2065-1 color space #124

merged 5 commits into from
Jan 7, 2025

Conversation

tomcur
Copy link
Member

@tomcur tomcur commented Jan 6, 2025

This color space doesn't need anything fancy and probably is useful.

/// [smpte]: https://pub.smpte.org/doc/st2065-1/20200909-pub/st2065-1-2021.pdf
/// [aceswp]: https://docs.acescentral.com/tb/white-point
#[derive(Clone, Copy, Debug)]
pub struct Aces2065_1;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The underscore in the name is "correct," but also a bit awkward, as it's just a single digit trailing.

Comment on lines +1455 to +1460
for (srgb, aces2065_1) in [
([0.6, 0.5, 0.4], [0.245_59, 0.215_57, 0.145_18]),
([0.0, 0.5, 1.0], [0.259_35, 0.270_89, 0.894_79]),
] {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These cases were generated with ColorAide.

@@ -48,6 +48,8 @@ pub enum ColorSpaceTag {
ProphotoRgb = 10,
/// The [`Rec2020`] color space.
Rec2020 = 11,
/// The [`Aces2065_1`] color space.
Aces2065_1 = 15,
/// The [`AcesCg`] color space.
AcesCg = 12,
/// The [`XyzD50`] color space.
Copy link
Member Author

@tomcur tomcur Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we want to keep this sorted? Renumbering may be breaking. If we don't renumber, I think I favor keeping related color spaces grouped together.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with what you did, but I think probably would be good to put a comment somewhere in there about it. I don't think re-numbering is good except (maybe) at breaking changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree that re-numbering in a patch release would be bad. But I also think that we should renumber these when we next make a breaking change. If people are storing color spaces in a file, then I'd like to encourage them to make their own ordering.

Copy link
Member Author

@tomcur tomcur Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noted the numbering may change, so users do not start relying on the numbering for archival.

If we do decide at some point never to renumber, it's easy enough to make the guarantee then.

@@ -15,6 +15,10 @@ You can find its changes [documented below](#022-2025-01-03).

This release has an [MSRV][] of 1.82.

### Added

* Support for the ACES2065-1 color space. ([#124][] by [@tomcur][])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need link below. Since I too love to forget them...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too easy to forget!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use Markdownlint to detect these, which generally works well (this is why the trailing [] are there, incidentally)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handy. I may try it out.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My settings are:

"markdownlint.config": {
        "no-emphasis-as-heading": false,
        "ul-indent": false,
        "no-inline-html": false,
        "first-line-h1": false,
        "no-duplicate-heading": false
    },

@waywardmonkeys
Copy link
Collaborator

Given the reaction by @raphlinus in the Zulip thread, I think this can land today!

@tomcur tomcur added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit b636fce Jan 7, 2025
16 checks passed
@tomcur tomcur deleted the ap0 branch January 7, 2025 15:16
@tomcur tomcur mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants