Created
March 23, 2017 15:53
-
-
Save ahaywood/5ae61142b34791cab491bbd7fe7b98a3 to your computer and use it in GitHub Desktop.
Creating a color scheme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scheme of colors | |
$colorscheme: ( | |
gray: ( | |
base: #ccc, | |
light: #f2f2f2, | |
dark: #666 | |
), | |
brown: ( | |
base: #ab906b, | |
light: #ecdac3, | |
dark: #5e421c | |
) | |
); | |
// Our function for shorter usage of map-get(); | |
@function setcolor($scheme, $tone: base) { | |
@return map-get(map-get($colorscheme, $scheme), $tone); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.element { | |
color: setcolor(brown); | |
} | |
.element--light { | |
color: setcolor(brown, light); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.element { | |
color: #ab906b; | |
} | |
.element--light { | |
color: #ecdac3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment