Created
January 3, 2020 01:14
-
-
Save robrez/bac94beda06feb77f30356e990895083 to your computer and use it in GitHub Desktop.
sass relative saturate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sass doesn't have the "relative" saturation option available in less | |
@function relative-sat($color, $amt) { | |
$h: hue($color); | |
$s: saturation($color); | |
$l: lightness($color); | |
$sRel: $s + ($s * ($amt / 100)); | |
@return hsl($h, $sRel, $l); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment