You are here

public static function SassScriptFunctions::hsl in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/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 * @param mixed The saturation of the colour as a percentage. * Must be between '0%' and 100%, inclusive * @param mixed The lightness of the colour as a percentage. * Must be between 0% and 100%, inclusive * @return new SassColour The resulting colour * @throws SassScriptFunctionException if saturation or lightness are out of bounds

File

phamlp/sass/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));
}