-
Notifications
You must be signed in to change notification settings - Fork 32
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@cobalt-ui/plugin-css': patch | ||
'@cobalt-ui/core': patch | ||
'@cobalt-ui/cli': patch | ||
--- | ||
|
||
Replace better-color-tools with culori for faster, more accurate color operations |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,35 +47,35 @@ | |
|
||
@supports (color: color(display-p3 1 1 1)) { | ||
:root { | ||
--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 commentThe 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. |
||
} | ||
|
||
[data-color-theme="light"] { | ||
--ds-color-blue: color(display-p3 0.129412 0.545098 1); | ||
--ds-color-blue: color(display-p3 0.12941176470588237 0.5450980392156862 1); | ||
} | ||
|
||
[data-color-theme="dark"] { | ||
--ds-color-blue: color(display-p3 0.219608 0.545098 0.992157); | ||
--ds-color-blue: color(display-p3 0.2196078431372549 0.5450980392156862 0.9921568627450981); | ||
} | ||
|
||
[data-color-theme="light-colorblind"] { | ||
--ds-color-blue: color(display-p3 0.129412 0.545098 1); | ||
--ds-color-blue: color(display-p3 0.12941176470588237 0.5450980392156862 1); | ||
} | ||
|
||
[data-color-theme="light-high-contrast"] { | ||
--ds-color-blue: color(display-p3 0.066667 0.407843 0.890196); | ||
--ds-color-blue: color(display-p3 0.06666666666666667 0.40784313725490196 0.8901960784313725); | ||
} | ||
|
||
[data-color-theme="dark-dimmed"] { | ||
--ds-color-blue: color(display-p3 0.254902 0.517647 0.894118); | ||
--ds-color-blue: color(display-p3 0.2549019607843137 0.5176470588235295 0.8941176470588236); | ||
} | ||
|
||
[data-color-theme="high-contrast"] { | ||
--ds-color-blue: color(display-p3 0.25098 0.619608 1); | ||
--ds-color-blue: color(display-p3 0.25098039215686274 0.6196078431372549 1); | ||
} | ||
|
||
[data-color-theme="dark-colorblind"] { | ||
--ds-color-blue: color(display-p3 0.219608 0.545098 0.992157); | ||
--ds-color-blue: color(display-p3 0.2196078431372549 0.5450980392156862 0.9921568627450981); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
"dev": "tsc -w" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.4.2" | ||
"@types/node": "^20.4.5" | ||
} | ||
} |
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