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 format to hsv color space #430

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Add format to hsv color space #430

merged 2 commits into from
Feb 13, 2024

Conversation

lloydk
Copy link
Collaborator

@lloydk lloydk commented Feb 13, 2024

The hsv color space couldn't be parsed because it didn't have a format entry.

I wasn't sure if the id should be hsv or --hsv. Ideally it should be --hsv but I went with hsv because even though you couldn't parse hsv colors they were being serialized as color(hsv ...) so the serialization is still backwards compatible.

The hsv color space couldn't be parsed because it didn't have
a format entry.
Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit c70a5df
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/65cbacc7d9ddec0008a60a93
😎 Deploy Preview https://deploy-preview-430--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.

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! I think we should serialize as --hsv per our recent resolution that nonstandard spaces use dashed idents.

That said, if we have a colorspace with id "--foo" and we are parsing a color with id "foo", it would be nice to parse it correctly and print out a warning (or at least throw a meaningful error). But that's a separate feature.

@lloydk lloydk merged commit 0f608f0 into color-js:main Feb 13, 2024
4 checks passed
@lloydk lloydk deleted the hsv branch February 13, 2024 20:46
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