-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add trait for clamping colors #12525
Conversation
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
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.
Some changes needed in the implementation for some types, as "out of range" does not have a meaning on some color spaces.
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.
Can you swap the language on the docs for the Oklab color spaces in this PR?
I'd really like to avoid accidentally desyncing those.
Probably use wording like "typically in the range of -1.5 to 1.5, although these values will not be clamped."
At this point I think its better in a review sense undo 527cbe2 and change the docs in another PR? This way we will not have the docs or code wrong here and can be fixed in a more addressed way in another place. Unless I misunderstood something here, of course. |
This reverts commit 527cbe2.
I'm reverting the change, but the problem pointed by @SolarLiner still exists, so we probably should open an issue or a PR as follow up to address this. |
I agree with merging this PR as-is and creating an issue to change the docs and implementation, as @alice-i-cecile described. |
Objective
Solution
ClampColor
Due to consistency,
is_within_bounds
is a method ofClampColor
, likeis_fully_transparent
is a method ofAlpha
Changelog
Added
ClampColor
trait