Skip to content

Instantly share code, notes, and snippets.

@airen
Created May 23, 2015 12:30
Show Gist options
  • Save airen/09f6ac131c4aacb02510 to your computer and use it in GitHub Desktop.
Save airen/09f6ac131c4aacb02510 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
$color-stack:
(group: orange, id: normal, color: #e67835),
(group: orange, id: pale, color: #f8a878),
(group: orange, id: dark, color: #ad490c),
(group: blue, id: normal, color: #426682);
// Color Function
@function color($group, $shade:normal, $transparency:1){
@each $color in $color-stack{
$c-group: map-get($color, group);
$c-shade: map-get($color, id);
@if($group == map-get($color, group) and $shade == map-get($color, id)){
@return rgba(map-get($color, color), $transparency);
}
}
}
body{
color: color(blue, normal,.8);
}
p{
color: color(orange);
}
blockquote{
color: color(blue);
background: color(orange, pale,.4);
border-color: color(orange, dark);
}
body {
color: rgba(66, 102, 130, 0.8); }
p {
color: #e67835; }
blockquote {
color: #426682;
background: rgba(248, 168, 120, 0.4);
border-color: #ad490c; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment