$cols: (#4FC, rgba(#AA1, .6), #E67); @for $i from 1 through 3 { $col: nth($cols, $i); .legend { .item.#{$i} { background: $col; } } }