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

Fix parsing coords that have a minimum range < 0 #619

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

lloydk
Copy link
Collaborator

@lloydk lloydk commented Dec 25, 2024

The acescc color space has coords with a range of [-0.358, 1.468].

The percentageRange function of the Type class was returning a value of [-1, 1] which caused coords specified as percentages to be calculated incorrectly.

The percentageRange function will now return [0, 1] if the Type has coordMeta with a range property.

Copy link

netlify bot commented Dec 25, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit c83c6ee
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/676c77373ef7b400084ee3aa
😎 Deploy Preview https://deploy-preview-619--colorjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lloydk
Copy link
Collaborator Author

lloydk commented Dec 25, 2024

With this fix all tests are green.

@LeaVerou
Copy link
Member

Thx! Could we add a changelog entry too? Otherwise this would become a blocker for the upcoming release.

The acescc color space has coords with a range of [-0.358, 1.468].

The percentageRange function of the Type class was returning a
value of [-1, 1] which caused coords specified as percentages to be
calculated incorrectly.

The percentageRange function will now return [0, 1] if the Type has
coordMeta with a range property.
@lloydk
Copy link
Collaborator Author

lloydk commented Dec 25, 2024

Thx! Could we add a changelog entry too? Otherwise this would become a blocker for the upcoming release.

done

@LeaVerou LeaVerou merged commit 713e72c into color-js:main Dec 26, 2024
5 checks passed
@LeaVerou
Copy link
Member

Thanks!

@lloydk lloydk deleted the fix-acescc-test branch January 4, 2025 06:12
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.

None yet

2 participants