Method: Sass::Script::Functions#lighten

Defined in:
lib/sass/script/functions.rb

#lighten($color, $amount) ⇒ Sass::Script::Value::Color

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

Examples:

lighten(hsl(0, 0%, 0%), 30%) => hsl(0, 0, 30)
lighten(#800, 20%) => #e00

Parameters:

Returns:

Raises:

  • (ArgumentError)

    if $amount is out of bounds, or either parameter is the wrong type

See Also:



1057
1058
1059
# File 'lib/sass/script/functions.rb', line 1057

def lighten(color, amount)
  _adjust(color, amount, :lightness, 0..100, :+, "%")
end