public function setColour($colour)
    {
        if (!preg_match('/^[a-f0-9]{6}$/i', $colour)) {
            throw new \InvalidArgumentException(sprintf('Value %s must be a valid hex colour', $colour));
        }

        $this->colour = $colour;

        return $this;
    }
public function setColour($colour)
    {
        if (!preg_match('/^[a-f0-9]{6}$/i', $colour)) {
            throw new \InvalidArgumentException(sprintf('Value %s must be a valid hex colour', $colour));
        }

        $this->colour = $colour;

        return $this;
    }
public function setColour ( $ colour ) { if ( ! preg_match ( '/^[a-f0-9]{6}$/i' , $ colour ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Value %s must be a valid hex colour' , $ colour ) ) ; } $ this -> colour = $ colour ; return $ this ; }
Set the colour of the line in the widget.

@param string $colour Colour of the line in the widget in hexadecimal format

@return $this
Set the colour of the line in the widget .