Skip to content

Instantly share code, notes, and snippets.

@jegtnes
Last active August 29, 2015 14:01
Show Gist options
  • Save jegtnes/e5316f4480507d24ecb5 to your computer and use it in GitHub Desktop.
Save jegtnes/e5316f4480507d24ecb5 to your computer and use it in GitHub Desktop.
A SCSS function generating 100 classes from green to red.
$i: 0;
$color: rgb(0, 255, 0);
@while $i < 100 {
$i: $i + 1;
.color-#{$i} {
color: $color;
}
$color: adjust-color($color, $red: 2.55, $green: -2.55);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment