Add OKLAB and OKLCH to color-picker#2446
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 |
|
@segunadebayo What's the status on this? We really want to use the Color picker but OKLCH support is a must for us. |
|
@segunadebayo How's the review process going? |
|
@segunadebayo any updates 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