Skip to content

Fix serialization of negative percentages - #554

Merged
lloydk merged 2 commits into
color-js:mainfrom
lloydk:serialize-negative
Jun 16, 2024
Merged

lloydk merged 2 commits into
color-js:mainfrom
lloydk:serialize-negative

Conversation

@lloydk

@lloydk lloydk commented Jun 15, 2024

Copy link
Copy Markdown
Collaborator

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].

@netlify

netlify Bot commented Jun 15, 2024 •

Copy link
Copy Markdown

βœ… 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.

Comment thread src/Type.js Resolved

@LeaVerou LeaVerou left a comment •

Copy link
Copy Markdown
Member

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
@LeaVerou

Copy link
Copy Markdown
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

lloydk commented Jun 16, 2024

Copy link
Copy Markdown
Collaborator Author

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