darken

darken($color, $amount)

Makes a color darker. Takes a color and a number between 0% and 100%, and returns a color with the lightness decreased by that amount.

Examples:

darken(hsl(25, 100%, 80%), 30%) => hsl(25, 100%, 50%)
darken(#800, 20%) => #200

Parameters:

  • $color (Color)
  • $amount (Number) The amount to decrease the lightness by, between 0% and 100%

Returns:

  • (Color)

Raises:

  • (ArgumentError) if $amount is out of bounds, or either parameter is the wrong type
doc_Sass
2016-11-11 13:09:05
Comments
Leave a Comment

Please login to continue.