////
/// Framework - Color
////

$colors: () !default;

/// Get a color from the color map
/// @param {String} $name - the color name
/// @param {String} $shade [default] - the version of the color
@function color($name, $shade: default) {
  $color: null;

  @if (map-has-key($colors, $name)) {
    @return key($colors, $name, $shade);
  } @else {
    @warn "#{$name} does not exist in $colors.";
    @return null;
  }
}

$bg-colors: () !default;

/// Get a color from the color map
/// @param {String} $name - the color name
/// @param {String} $shade [default] - the version of the color
@function bg_color($name, $shade: default) {
  $bg-color: null;

  @if (map-has-key($bg-colors, $name)) {
    @return key($bg-colors, $name, $shade);
  } @else {
    @warn "#{$name} does not exist in $colors.";
    @return null;
  }
}
