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 serialization of negative percentages #554

Merged
merged 2 commits into from
Jun 16, 2024

Conversation

lloydk
Copy link
Collaborator

@lloydk lloydk commented Jun 15, 2024

Closes #552

Changes the hard coded percentage ranges to a variable range based on whether or not the lower bounds of the range is < 0. Spaces that do not have coordinate ranges (e.g. xyz-d65) will have a percentage range of [0, 1] and [0, 100].

Copy link

netlify bot commented Jun 15, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit 0ede7fc
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/666e3cff3c5e9b000945bcb6
😎 Deploy Preview https://deploy-preview-554--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.

src/Type.js Outdated Show resolved Hide resolved
Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, see comment wrt naming.

Co-authored-by: Lea Verou <lea@verou.me>
@lloydk lloydk merged commit 72cc69a into color-js:main Jun 16, 2024
1 check failed
@LeaVerou
Copy link
Member

Gah, now this introduces an error, since we changed the name of the function but not of the function calls. The suggestion was indicative, sorry if that wasn't clear!

LeaVerou added a commit that referenced this pull request Jun 16, 2024
@lloydk
Copy link
Collaborator Author

lloydk commented Jun 16, 2024

Gah, now this introduces an error, since we changed the name of the function but not of the function calls. The suggestion was indicative, sorry if that wasn't clear!

Oops, I was watching tv and wasn't really paying attention.

@lloydk lloydk deleted the serialize-negative branch June 16, 2024 01:26
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.

Incorrect serialization of negative values for sRGB and HSL
2 participants