Méthode |
Description |
|
__construct ( mixed $colour ) : SassColour |
Constructs an RGB or HSL color object, optionally with an alpha channel. |
|
asHex ( $inc_hash = TRUE ) |
|
|
assertValid ( array $colour, boolean $all = true ) : string |
Asserts that the colour space is valid. |
|
getAlpha ( boolean $value = false ) : float |
Returns the alpha component (opacity) of this colour. |
|
getBlue ( boolean $value = false ) : integer |
Returns the blue component of this colour. |
|
getGreen ( boolean $value = false ) : integer |
Returns the green component of this colour. |
|
getHsl ( ) : array |
Returns an array with the HSL components of this colour. |
|
getHsla ( ) : array |
Returns an array with the HSL and alpha components of this colour. |
|
getHue ( boolean $value = false ) : float |
Returns the hue of this colour. |
|
getLightness ( boolean $value = false ) : float |
Returns the lightness of this colour. |
|
getRed ( boolean $value = false ) : integer |
Returns the red component of this colour. |
|
getRgb ( ) : array |
Returns an array with the RGB components of this colour. |
|
getRgba ( ) : array |
Returns an array with the RGB and alpha components of this colour. |
|
getSaturation ( boolean $value = false ) : float |
Returns the saturation of this colour. |
|
getValue ( ) : array |
Returns the value of this colour. |
|
hsl2rgb ( ) |
Converts from HSL to RGB colourspace
Algorithm from the CSS3 spec: {@link http://www.w3.org/TR/css3-color/#hsl-color} |
|
hue2rgb ( $p, $q, $t ) |
Converts from hue to RGB colourspace |
|
isTranslucent ( ) : boolean |
Returns whether this colour object is translucent; that is, whether the alpha channel is non-1. |
|
isa ( string $subject ) : mixed |
Returns a value indicating if a token of this type can be matched at
the start of the subject string. |
|
length ( ) |
|
|
nth ( $i ) |
|
|
op_bw_and ( mixed $other ) : sassColour |
Colour bitwise AND |
|
op_bw_or ( mixed $other ) : sassColour |
Colour bitwise OR |
|
op_bw_xor ( mixed $other ) : sassColour |
Colour bitwise XOR |
|
op_div ( mixed $other ) : sassColour |
Colour division |
|
op_minus ( mixed $other ) : sassColour |
Colour subraction |
|
op_modulo ( mixed $other ) : sassColour |
Colour modulus |
|
op_not ( ) : sassColour |
Colour bitwise NOT |
|
op_plus ( $other ) : sassColour |
Colour addition |
|
op_shiftl ( sassNumber $other ) : sassColour |
Colour bitwise Shift Left |
|
op_shiftr ( sassNumber $other ) : sassColour |
Colour bitwise Shift Right |
|
op_times ( $other ) : sassColour |
Colour multiplication |
|
rgb2hsl ( ) |
Converts from RGB to HSL colourspace
Algorithm adapted from {@link http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript} |
|
toString ( boolean $css3 = true ) : string |
Converts the colour to a string. |
|
with ( array $attributes ) |
Returns a copy of this colour with one or more channels changed. |
|