First off, the reason your suggested syntax doesn't work is because when interpolations are included in property values, the text around it (such as the '$' symbol) is interpreted as plain CSS. This is noted in the SASS reference on interpolations.
I'd suggest using SASS lists instead. Something like this would give you the functionality you're after:
@mixin link($color) {
color: nth($color, 2);
&:hover {
color: white;
background-color: nth($color, 4);
}
}
$red: (#821B0D, #B13631, #D75B5B, #F18788, #FDB9B0);
.test {
@include link($red);
}
(Note that the index values passed to the nth() function are one-based, not zero-based.)