Skip to content

Instantly share code, notes, and snippets.

@chriswburke
Created April 16, 2015 01:14
Show Gist options
  • Save chriswburke/fa42d954d53bc4c9a8e3 to your computer and use it in GitHub Desktop.
Save chriswburke/fa42d954d53bc4c9a8e3 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$colors: (
'gold': (
0: #a49262,
1: #c5bb9d,
2: #dfdac9,
),
'grey': (
0: #2f2f2f,
1: #9b9b9b,
2: #cacaca,
),
'red': #ca1010,
'pink': #ed7ba3,
'blue': #1f9bde,
'black': #060f2c,
'white': #f9f9f6,
);
@function color($name, $variant: null) {
$color: null;
@if $variant {
$color-spectrum: map-get($colors, $name);
$color: map-get($color-spectrum, $variant);
} @else {
$color: map-get($colors, $name)
}
@return $color;
}
.single {
background: color('black');
}
.variant {
background: color('gold', 0);
}
.single {
background: #060f2c;
}
.variant {
background: #a49262;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment