-
Notifications
You must be signed in to change notification settings - Fork 78
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
High-level color.lighten() color.darken() methods #8
Comments
Rel #8 Currently just linear, but we can improve.
Sass color functions lighten() and darken() vs. mix() with black and white These increase or decrease HSL Lightness by a fixed amount. Therefore they will drive fairly light or fairly dark colors to white or black respectively. The amount of visible lightening and darkening also depends strongly on the hue.
// #036 has lightness 20%, so when darken() subtracts 30% it just returns black.
@debug darken(#036, 30%); // black
// scale() instead makes it 30% darker than it was originally.
@debug color.scale(#036, $lightness: -30%); // #002447 |
Looking at that one in Lab, |
After exploring this a bit, this is a very non-trivial problem. Removing the milestone from this (which was incorrect anyway, since Public release happened 2 years ago!) |
Possibly using some sort of sigmoid function, per @svgeesus recommendation
The text was updated successfully, but these errors were encountered: