public static function SassScriptFunctions::darken in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/script/SassScriptFunctions.php \SassScriptFunctions::darken()
* Makes a colour darker. *
Parameters
SassColour The colour to darken: * @param SassNumber The amount to darken 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 80% and the amount is 50%, * the resulting colour lightness value is 30% if the amount is a proportion * of the total range, whereas it is 40% if the amount is a proportion of the * current value. * @return new SassColour The darkened colour * @throws SassScriptFunctionException If $colour is not a colour or * $amount is not a number * @see adjust
File
- phamlp/
sass/ script/ SassScriptFunctions.php, line 307
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function darken($colour, $amount, $ofCurrent = false) {
return self::adjust($colour, $amount, $ofCurrent, 'lightness', self::DECREASE, 0, 100, '%');
}