desaturate

desaturate($color, $amount)

Makes a color less saturated. Takes a color and a number between 0% and 100%, and returns a color with the saturation decreased by that value.

Examples:

desaturate(hsl(120, 30%, 90%), 20%) => hsl(120, 10%, 90%)
desaturate(#855, 20%) => #726b6b

Parameters:

  • $color (Color)
  • $amount (Number) The amount to decrease the saturation 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:06
Comments
Leave a Comment

Please login to continue.