You are here

public static function SassScriptFunctions::lighten in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/SassScriptFunctions.php \SassScriptFunctions::lighten()

* Makes a colour lighter. *

Parameters

SassColour The colour to lighten: * @param SassNumber The amount to lighten the colour by * @param 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 new SassColour The lightened colour * @throws SassScriptFunctionException If $colour is not a colour or * $amount is not a number * @see lighten_rel

File

phamlp/sass/script/SassScriptFunctions.php, line 287

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, '%');
}