@function color($color,$tone){

    // @warn map-get($palettes,$color);

    @if map-has-key($palettes,$color){
        $color: map-get($palettes,$color);

            @if map-has-key($color,$tone){
                $tone: map-get($color,$tone);
                @return $tone;
            }

            @warn "unknown tone `#{$tone}` in color";
            @return null;        
    }

    @warn "unknown color `#{$color}` in palette";
    @return null;
   
}
@function str-replace($string, $search, $replace: '') {
    $index: str-index($string, $search);
    
    @if $index {
      @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
    }
    
    @return $string;
  }