$su_color-key: 'base' !default;

$su_colors: (
  'primary': (
    'base': #72c024,
    'light': #ade576,
    'dark': #59951c
  ),
  'accent': (
    'base': #da137f,
    'light': #f162b0,
    'dark': #9c0e5b
  ),
  'secondary': (
    'base': #1b5709,
    'light': #25760c,
    'dark': #113806
  ),
  'foreground': (
    'base': #62a821,
    'light': #73c427,
    'dark': #6ab624,
    'darker': #28450d
  ),
  'background': (
    'base': #dadad0,
    'light': #f0f0ed,
    'dark': #c4c4b3
  )
);

$su_opacity: (
  'super-light': 0.9,
  'light': 0.8,
  'heavy': 0.4
);


///
/// Get the hexadecimal color value (and its variations) from the su_ colors palette.
///
/// @param {String} $type ['primary'] - A valid color type. (primary, secondary, accent, foreground, background)
/// @param {String} $variant ['primary'] - A variant of the color type
/// @param {Number} $opacity ['primary'] - A number between 0 and 1 or a value within the $su_opacity map
/// @return {HEX Value}
///

@function su_color( $type: 'primary', $variant: $su_color-key, $opacity: 1 ) {

  $color: null;

  // Get the color spectrum
  $color-spectrum: map-get($su_colors, $type);

  // Get the color variant
  @if $color-spectrum {
    $color: map-get($color-spectrum, $variant);
  }

  // Get the alpha setting
  $alpha: if(type-of($opacity) == 'number', $opacity, map-get($su_opacity, $opacity));

  // Set the alpha of the color
  @if $alpha {
    $color: rgba($color, $alpha);
  }

  @return $color;
}

///
/// Generate a black color with opacity
///
/// @param {Number} $opacity [1] - A value between 0 and 1
///

@function black($opacity: 1){
  @return rgba(0, 0, 0, $opacity)
}

///
/// Generate a white color with opacity
///
/// @param {Number} $opacity [1] - A value between 0 and 1
/// @return {Color}
///

@function white($opacity: 1){
  @return rgba(255, 255, 255, $opacity)
}

Add the su_color function, Add the black and white functions
Add the su_color function, Add the black and white functions
