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

LCH Color space support & bounds checking #3

Open
KalilDev opened this issue May 29, 2021 · 0 comments
Open

LCH Color space support & bounds checking #3

KalilDev opened this issue May 29, 2021 · 0 comments

Comments

@KalilDev
Copy link

KalilDev commented May 29, 2021

Hey, i need to use the LCH color space for an application and the package does not support it. I implemented it locally, with the same bounds checking as the other color models and i hit assertion errors because my application uses out of range colors as intermediaries while generating valid colors. I also noticed how redundant writing an color model became with all the assertions, which also are hardcoded, making it hard to refactor. So, how would we ago about this? Should i open an pr with all the bounds checking and then we address it later, with an way to disable it in the constructors or moving them to an separate static method for each space, so that constructors can call assert(ColorSpaceBounds.checkHsl(hue, saturation, lightness, allowOutOfBounds)), instead of manually checking each value in the constructor, toList, and other methods?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant