You are here

public static function SassScriptFunctions::lighten in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::lighten()

Makes a colour lighter.

Parameters

SassColour The colour to lighten:

SassNumber The amount to lighten the colour by:

SassBoolean Whether the amount is a proportion of the current value: (true) or the total range (false). The default is false - the amount is a proportion of the total range. If the colour lightness value is 40% and the amount is 50%, the resulting colour lightness value is 90% if the amount is a proportion of the total range, whereas it is 60% if the amount is a proportion of the current value.

Return value

new SassColour The lightened colour

Throws

SassScriptFunctionException If $colour is not a colour or $amount is not a number

See also

lighten_rel

File

phpsass/script/SassScriptFunctions.php, line 294

Class

SassScriptFunctions
SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script

Code

public static function lighten($colour, $amount, $ofCurrent = false) {
  return self::adjust($colour, $amount, $ofCurrent, 'lightness', self::INCREASE, 0, 100, '%');
}