@use "../../variables/index" as *;

// darkens the $color by adding
// black on top with $alpha opacity (0 - 1)
@mixin darken($color,$alpha) {
  background: linear-gradient(to top, rgba(0, 0, 0, $alpha), rgba(0, 0, 0, $alpha)) $color;
}

// Lighten the $color by adding
// white on top with $alpha opacity (0 - 1)
@mixin lighten($color,$alpha) {
  background: linear-gradient(to top, rgba(255, 255, 255, $alpha), rgba(255, 255, 255, $alpha))
    $color;
}

// changes the brightness of given element
// darken 0- black to 1 - no change
// lighten 1 - no change to no limit
@mixin brightness($amount) {
  filter: brightness($amount);
}
