@function re-color($color, $percentage) {
$toadd: 0;
@if( $percentage < 30 or $percentage > 70 ){
$toadd : 10;
}
@if (lightness($color) > 80) {
@return darken($color, $percentage + $toadd );
}
@else if(lightness($color) > 49) {
@return darken($color, $percentage );
}
@else if(lightness($color) > 20){
@return lighten($color, $percentage );
}
@else{
@return lighten($color, $percentage + $toadd );
}
}