-
Notifications
You must be signed in to change notification settings - Fork 29
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
Replace better-color-tools with culori #61
Conversation
Deploying with Cloudflare Pages
|
🦋 Changeset detectedLatest commit: 2b551c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d9209b2
to
04b012f
Compare
04b012f
to
2b551c2
Compare
@@ -22,17 +22,17 @@ | |||
|
|||
@supports (color: color(display-p3 1 1 1)) { | |||
:root { | |||
--ds-color-gray: color(display-p3 0.329412 0.278431 0.254902); | |||
--ds-border: 1px solid color(display-p3 0.05098 0.011765 0); | |||
--ds-color-gray: color(display-p3 0.32941176470588235 0.2784313725490196 0.2549019607843137); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I guess all the rounding I was doing was slowing my library down for no good reason
--ds-color-blue: color(display-p3 0.129412 0.545098 1); | ||
--ds-gradient: color(display-p3 0.129412 0.545098 1) 0%, color(display-p3 0.909804 0.352941 0.678431) 100%; | ||
--ds-color-blue: color(display-p3 0.12941176470588237 0.5450980392156862 1); | ||
--ds-gradient: color(display-p3 0.12941176470588237 0.5450980392156862 1) 0%, color(display-p3 0.9098039215686274 0.35294117647058826 0.6784313725490196) 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I’m glad I maintained my own color science library for a bit. If no other reason than to be sure the colors were accurate. With thousands of ways to do things in culori, it’s so easy to produce the wrong colors when upconverting to P3, and it would take a while to realize it.
See note. Culori is a better color science option, but more importantly, is more performant.
Technically this increases the footprint of Cobalt by a few kB, but it’s still pretty stinkin’ small. And this runs in Node, so footprint isn’t nearly as much of a concern as production frontend code.