Im trying to modify the lightness of a color, by a percentage of its distance to 100%, so that way I never go to 100% or over, resulting in white.
Honestly there may be a smarter what to do this, but my solution was to try something like this:
.zeno-lighten(@new-var-name;@color;@percentage:.5){
@new-lightness: lightness(@color) + (100% - lightness(@color)) * @percentage;
@{new-var-name}: hsl(hue(@color), saturation(@color), @new-lightness);
}
.cool-div{
.zeno-lighten(@new-bg;indianred;.5);
}
It works if I make a static varname instead of creating based on an argument in the mixin.
Thanks!