Skip to content
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

Allow using on lab::Lab #59

Open
roxwize opened this issue Apr 25, 2024 · 1 comment
Open

Allow using on lab::Lab #59

roxwize opened this issue Apr 25, 2024 · 1 comment
Labels
enhancement New feature or request library Improvements to library functionality or structure

Comments

@roxwize
Copy link

roxwize commented Apr 25, 2024

There exists another library on Rust, lab, that has a Lab struct nearly identical to palettes, the main difference being the L*a*b* parameters are f32's rather than generic types and there is no white_point. The same also applies to the LCh struct. I would like to be able to use this struct over the one palette provides, if possible. Cheers.

@okaneco okaneco added enhancement New feature or request library Improvements to library functionality or structure labels Apr 26, 2024
@okaneco
Copy link
Owner

okaneco commented Apr 26, 2024

I'll try to add that as a feature soon.

In the meantime to get up and running, you could wrap it in a newtype then copy the current Lab implementation. But that's obviously cumbersome and not ideal.

As for LCh, I didn't implement it originally because the results end up being the same as Lab, it's just a different representation of the same space. It ends up slower because you now have to do 2 extra conversions of Lab->LCh->Lab. You can just convert the resulting Lab centroids to LCh after the fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request library Improvements to library functionality or structure
Projects
None yet
Development

No branches or pull requests

2 participants