public function SassColour::getRed in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/script/literals/SassColour.php \SassColour::getRed()
Returns the red component of this colour.
Return value
integer the red component of this colour.
13 calls to SassColour::getRed()
- SassColour::getRgba in phpsass/
script/ literals/ SassColour.php - Returns an array with the RGB and alpha components of this colour.
- SassColour::op_bw_and in phpsass/
script/ literals/ SassColour.php - Colour bitwise AND
- SassColour::op_bw_or in phpsass/
script/ literals/ SassColour.php - Colour bitwise OR
- SassColour::op_bw_xor in phpsass/
script/ literals/ SassColour.php - Colour bitwise XOR
- SassColour::op_div in phpsass/
script/ literals/ SassColour.php - Colour division
File
- phpsass/
script/ literals/ SassColour.php, line 678
Class
- SassColour
- SassColour class. A SassScript object representing a CSS colour.
Code
public function getRed() {
if (is_null($this->red)) {
$this
->hsl2rgb();
}
return max(0, min(255, round($this->red)));
}