@each $tuple in 'ok' #5cff56, 'warning' #ff4b41, 'favorite' #d16059 { .#{nth($tuple, 1)} { color: #{nth($tuple, 2)}; } } @each $tuple in 'green' #42bd41, 'red' #d01715, 'blue' #5778fd, 'orange' #FBA026, 'lightblue' #03a9f5, 'yellow' #ffeb3c, 'purple' #673bb7, 'pink' #ffa6e3, 'grey' #dcdcdc, 'darkred' #B8312F, 'darkgreen' #009788, 'darkblue' #3f51b5 { .#{nth($tuple, 1)} { background: #{nth($tuple, 2)}; } }