You are here

public function SassColour::getGreen in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/script/literals/SassColour.php \SassColour::getGreen()

* Returns the green component of this colour. *

Return value

integer the green component of this colour.

13 calls to SassColour::getGreen()
SassColour::getRgba in phamlp/sass/script/literals/SassColour.php
* Returns an array with the RGB and alpha components of this colour. *
SassColour::op_bw_and in phamlp/sass/script/literals/SassColour.php
* Colour bitwise AND *
SassColour::op_bw_or in phamlp/sass/script/literals/SassColour.php
* Colour bitwise OR *
SassColour::op_bw_xor in phamlp/sass/script/literals/SassColour.php
* Colour bitwise XOR *
SassColour::op_div in phamlp/sass/script/literals/SassColour.php
* Colour division *

... See full list

File

phamlp/sass/script/literals/SassColour.php, line 667

Class

SassColour
SassColour class. A SassScript object representing a CSS colour.

Code

public function getGreen() {
  if (is_null($this->green)) {
    $this
      ->hsl2rgb();
  }
  return max(0, min(255, round($this->green)));
}