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

[Color 4] Update behavior to match latest specs #278

Merged
merged 1 commit into from
Apr 10, 2024
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Mar 29, 2024

@nex3 nex3 marked this pull request as ready for review March 29, 2024 22:30
@nex3 nex3 requested a review from Goodwine March 29, 2024 22:31
const hue = normalizeHue(options.hue ?? NaN);
const saturation = options.saturation ?? NaN;
let lightness = options.lightness ?? NaN;
lightness = assertClamped(lightness, 0, 100, 'lightness');
Copy link
Member

Choose a reason for hiding this comment

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

I see that the JS API says that there will no longer be errors thrown out when the lightness is out of the accepted range. But I'm slightly confused what's supposed to happen in that case. Is the value just passed through and the client/browser will handle such case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. Per spec, it will ultimately be gamut-mapped into the display range of the view screen.

@nex3 nex3 merged commit fef63f3 into feature.color-4 Apr 10, 2024
16 checks passed
@nex3 nex3 deleted the update-color branch April 10, 2024 00:15
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.

2 participants