Skip to content

Instantly share code, notes, and snippets.

Last active Nov 7, 2018
What would you like to do?
Color Tile Generator
$colors: (
primary: #de1c24,
secondary: #d3ffce,
// Generates Colors Tiles automatically. No need to write more SCSS
@each $name, $color in $colors {
&--#{$name} {
.color-tile__color {
background-color: $color;
@if (lightness($color) > 80) {
color: black;
@else {
color: white;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment