You are here

public static function SassScriptFunctions::saturate in Sassy 7

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

* Makes a colour more saturated. *

Parameters

SassColour The colour to saturate: * @param SassNumber The amount to saturate 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 saturation value is 40% and the amount is 50%, * the resulting colour saturation 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 saturated colour * @throws SassScriptFunctionException If $colour is not a colour or * $amount is not a number * @see adjust

File

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

Class

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

Code

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