// Source: http://vimeo.com/13804978

@mixin fg-color($bg-color) {
    @if lightness($bg-color) < 30% {
        color: #eee;
    } else {
        color: #333;
    }
}

@mixin readable($bg-color) {
    background-color: $bg-color;
    @include fg-color($bg-color);
}