public static function SassScriptFunctions::opacity in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::opacity()
Returns the alpha component (opacity) of a colour.
Parameters
SassColour The colour:
Return value
new SassNumber The alpha component (opacity) of colour
Throws
SassScriptFunctionException If $colour is not a colour
File
- phpsass/
script/ SassScriptFunctions.php, line 255
Class
- SassScriptFunctions
- SassScript functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.script
Code
public static function opacity($colour) {
SassLiteral::assertType($colour, 'SassColour');
return new SassNumber($colour->alpha);
}