-
-
Notifications
You must be signed in to change notification settings - Fork 204
Add OKLAB and OKLCH to color-picker #2446
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@V1OL3TF0X thanks for this PR. Love the direction. Could we do this without an additional dependency? We want to keep the bundle size roughly similar |
@segunadebayo Done - I leaned out the dependency as much as possible. This has the downside of not clamping by chroma but by RGB (less accurate, but I'm not smart enough to translate I also updated the docs a bit, to include the new modes |
@segunadebayo what's the status on this? Should I add the version bump, is the docs update good? If not, what's there to change? |
@V1OL3TF0X I'm going to review the code slowly for the next week or so. Thanks again for working on this |
Addresses @2439
📝 Description
This PR adds two new modes to the color-picker: oklch and oklab. I also needed to fix a bit of the logic, so switching between modes worked properly. A also tried to update the examples to the best of my abilities
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
If anything falls outside contribution guidelines, please let me know - I tried to follow the code style to the best of my abilities, but some things may have slipped through.
As parsing oklab and oklch has some complicated math involved, I opted to add culori/js to take care of that