Skip to content

Conversation

facelessuser
Copy link
Collaborator

This fixes bad conversion due to "none" usage and other "none" related issues.
Ref #475

Copy link

netlify bot commented Mar 10, 2024

Deploy Preview for colorjs ready!

Name Link
🔨 Latest commit 03a91b4
🔍 Latest deploy log https://app.netlify.com/sites/colorjs/deploys/65ee52a7dcfdc70008b79b76
😎 Deploy Preview https://deploy-preview-476--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
Collaborator

@lloydk lloydk left a comment

Choose a reason for hiding this comment

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

LGTM except for the APCA contrast method which doesn't handle colors with none.

> new Color("red").contrast(new Color("rgb(none 100% 100%)"), "apca");
> NaN

@facelessuser
Copy link
Collaborator Author

Yeah, I was fixing existing handling, I didn't try to identify new broken cases 🙂

@facelessuser
Copy link
Collaborator Author

I'll address it.

@facelessuser
Copy link
Collaborator Author

Done

> new Color("red").contrast(new Color("rgb(none 100% 100%)"), "apca");
-53.91362069001541

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.

Fantastic work, thank you so much!!

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.

3 participants