public static function SassScriptFunctions::hsl in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::hsl()
Creates a SassColour object from hue, saturation, and lightness. Uses the algorithm from the {@link http://www.w3.org/TR/css3-colour/#hsl-colour CSS3 spec}.
Parameters
float The hue of the colour in degrees.: Should be between 0 and 360 inclusive
mixed The saturation of the colour as a percentage.: Must be between '0%' and 100%, inclusive
mixed The lightness of the colour as a percentage.: Must be between 0% and 100%, inclusive
Return value
new SassColour The resulting colour
Throws
SassScriptFunctionException if saturation or lightness are out of bounds
File
- phpsass/
script/ SassScriptFunctions.php, line 132
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function hsl($h, $s, $l) {
return self::hsla($h, $s, $l, new SassNumber(1));
}