Skip to content

Instantly share code, notes, and snippets.

@allanwhite
Last active August 29, 2015 14:19
Show Gist options
  • Save allanwhite/44657038b4c51d06f2b0 to your computer and use it in GitHub Desktop.
Save allanwhite/44657038b4c51d06f2b0 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$gray-base: hsl(30, 7%, 0%);
$steps: 12;
@for $c from 1 through $steps{
$theColor: adjust-color($gray-base, $lightness: ($c * (100 / $steps)));
// can we generate global variables at this stage?
.gray-#{$c}{
background-color: $theColor;
}
}
// goal: a list of gray-n variables for use in SASS
$gray-1: hsl(25, 0%, 100%);
$gray-2: hsl(25, 10%, 96%);
$gray-3: hsl(25, 10%, 90%);
$gray-4: hsl(25, 10%, 82%);
$gray-5: hsl(25, 10%, 70%);
$gray-6: hsl(25, 9%, 60%);
$gray-7: hsl(25, 8%, 50%);
$gray-8: hsl(25, 9%, 40%);
$gray-9: hsl(25, 10%, 30%);
$gray-10: hsl(25, 10%, 20%);
$gray-11: hsl(25, 10%, 12%);
$gray-12: hsl(25, 10%, 0%);
.gray-1 {
background-color: #171514;
}
.gray-2 {
background-color: #2d2b28;
}
.gray-3 {
background-color: #44403b;
}
.gray-4 {
background-color: #5b554f;
}
.gray-5 {
background-color: #726a63;
}
.gray-6 {
background-color: #888077;
}
.gray-7 {
background-color: #9c958d;
}
.gray-8 {
background-color: #b0aaa4;
}
.gray-9 {
background-color: #c4bfbb;
}
.gray-10 {
background-color: #d7d5d2;
}
.gray-11 {
background-color: #ebeae8;
}
.gray-12 {
background-color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment