Created
March 17, 2016 17:02
-
-
Save jamiewilson/aa98a81e0d0955fbf068 to your computer and use it in GitHub Desktop.
Sass Random Color Generator
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
/* Create random color for brands */ | |
/* http://geoffgraham.me/randomize-sass */ | |
$s-min: 20; | |
$s-max: 70; | |
$l-min: 30; | |
$l-max: 90; | |
@for $i from 1 through 100 { | |
.card:nth-child(#{$i}) .card-brand-color { | |
background-color: hsl(random(360),$s-min+random($s-max+-$s-min),$l-min+random($l-max+-$l-min)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment