// a function to easily get the color value of the colors-map
@function color($color-value: default) {
  @if variable-exists(colors) == false {
    @warn '$colors Sass-map does not exist, please provide one in your config. Defaulting to red';
    @return #f00;
  } @else if map-has-key($colors, $color-value) == false {
    @warn 'Index "#{$color-value}" not found in $colors Sass-map using function color. Defaulting to red';
    @return #f00;
  }

  @return map-get($colors, $color-value);
}

// mixins using the function above
@mixin color($color-value: default) {
  color: color($color-value);
}

@mixin background-color($color-value: default) {
  background-color: color($color-value);
}

@mixin border-color($color-value: default) {
  border-color: color($color-value);
}

@mixin fill($color-value: default) {
  fill: color($color-value);
}
