Skip to content

Instantly share code, notes, and snippets.

@jamiewilson
Created March 17, 2016 17:02
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamiewilson/aa98a81e0d0955fbf068 to your computer and use it in GitHub Desktop.
Save jamiewilson/aa98a81e0d0955fbf068 to your computer and use it in GitHub Desktop.
Sass Random Color Generator
/* 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