// -----------------------------------------------------------------------------
// This file contains all color variable map and function to get them
// -----------------------------------------------------------------------------

// Color Variables
$white: #fff;

// Setting Project Main Color Map
$es-color-key: 11 !default;

$es-colors: (
  green: (
    1: #f0f7ed,
    2: #e9f4e3,
    3: #e1f0da,
    4: #d3e9c8,
    5: #c4e2b6,
    6: #b6dba4,
    7: #a7d391,
    8: #99cc7f,
    9: #8ac56d,
    10: #7bbe5b,
    11: #6db749,
    12: #61a441,
    13: #57923a
  ),
  lightGreen: (
    1: #f9faee,
    2: #f6f7e6,
    3: #f3f5dd,
    4: #edf0cd,
    5: #e7ebbc,
    6: #e2e7ab,
    7: #dce29a,
    8: #d6dd8a,
    9: #d0d879,
    10: #cad369,
    11: #c5cf58,
    12: #b0b94f,
    13: #9da546
  ),
  black: (
    1: #f8f8f8,
    2: #f3f4f4,
    3: #e9ebeb,
    4: #dee0e0,
    5: #d3d6d6,
    6: #bec2c2,
    7: #a8adae,
    8: #93999a,
    9: #7d8485,
    10: #687071,
    11: #525b5d,
    12: #3d4749,
    13: #273335
  ),
  orange: (
    1: #fef7ee,
    2: #fdf2e5,
    3: #fdeedd,
    4: #fce6cc,
    5: #fbdebb,
    6: #fad6aa,
    7: #f9ce99,
    8: #f8c688,
    9: #f7be77,
    10: #f6b666,
    11: #f6ae55,
    12: #dc9c4c,
    13: #c48b44
  ),
  red: (
    1: #fdf0ee,
    2: #fde8e5,
    3: #fce0dd,
    4: #fbd1cc,
    5: #fac2bb,
    6: #f9b3aa,
    7: #f8a399,
    8: #f79489,
    9: #f68577,
    10: #f57667,
    11: #f46756,
    12: #db5c4d,
    13: #c35244
  )
);

// Unique colors used in application
$placeholder: #559bd8;

@function es-color($name: green, $variant: $es-color-key) {
  $color: null;

  // Get the color spectrum
  $color-spectrum: map-get($es-colors, $name);

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

  @return $color;
}

// Usage Example

// background-color: es-color(green); Default color
// background-color: es-color(green, 5); Version of Default color

// background-color: es-color(black); Default black color
// background-color: es-color(black, 3); Version of Default black color
