-
Notifications
You must be signed in to change notification settings - Fork 267
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
Fix lightness manipulators lighten and darken. #92
Conversation
Lightness functions should work in percent.
// @mattbasta @sindresorhus @MoOx can you confirm this is what is expected? This is a breaking change :P |
Per examples here https://github.com/Qix-/color#manipulation many functions seems to be modifiers, so act on the current existing value (so current - current * value) make sense. Note: maybe I am wrong, I am not especially a pro about color manipulation :) |
Both are correct, because each is a different blending function. Each has a valid use case. The question is which is most expected. To me, the existing behavior makes the most sense. |
Many developers will be confused |
By other libraries you mean Sass and LESS? |
For example
Current library has 48 issues. So I guess, issues will be appear again until we resolve it. |
Just one thing imo: you cannot just remove/replace a function. This module has been downloaded so many times... |
I agree with you. We need to support users. I think, we have 3 options:
I like second option as you can see :) |
Adding a breaking change is fine, but you should still offer the relative implementation (eg: relativeLighten or something). |
So, I think name relative implementation as |
This won't make it into the v1.x makeover, but I'd like to look into this more. I agree that those functions are super confusing. I'll dig a bit deeper, see the differences with them applied to a few images, and maybe suggest a few names and whatnot. |
I'd love to set an absolute value for the |
I think we keep the existing name: darken, lighten, saturation, desaturation, do abolute percentage changes makes sense. We may need regard the relative changes as a bug, not a feature. So it would not be a concern for break back compatible ablity. |
I'm closing this, upon further review this is not the way this should work (it's a breaking change). Please see #53, as that should be the definitive place for discussion. |
Lightness functions should work in percent. #91