Created
April 5, 2017 09:55
-
-
Save zastrow/5acf8e9e74cd7f795f8e621005562938 to your computer and use it in GitHub Desktop.
Simple color function for defining grays with Sass
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
// Grayscale | |
@function gray($level) { | |
@if $level == 0 { | |
@return white; | |
} | |
@else if $level == 100 { | |
@return black; | |
} | |
@else { | |
@return darken(white, $level * 1%);; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment