SassColour::assertValid
Asserts that the colour space is valid.
Returns the name of the colour space: 'rgb' if red, green, or blue keys given; 'hsl' if hue, saturation or lightness keys given; null if a non-associative array
Signature
public function assertValid(
$colour,
[boolean
$all = true] )
Parameters
$colour
—$all
— boolean
Returns
- string
- name of the colour space
Errors/Exceptions
-
SassColourException
- if mixed colour space keys given or not all