You are here

public static function SassScriptFunctions::greyscale in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/SassScriptFunctions.php \SassScriptFunctions::greyscale()

Converts a colour to greyscale. Reduces the saturation to zero.

Parameters

SassColour The colour:

Return value

new SassColour The greyscale colour

See also

desaturate

File

phpsass/script/SassScriptFunctions.php, line 455

Class

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

Code

public static function greyscale($colour) {
  return self::desaturate($colour, new SassNumber(100));
}