public function toHexString() : string
    {
        return '#' . sprintf('%02x', $this->red) . sprintf('%02x', $this->green) . sprintf('%02x', $this->blue);
    }
public function toHexString() : string
    {
        return '#' . sprintf('%02x', $this->red) . sprintf('%02x', $this->green) . sprintf('%02x', $this->blue);
    }
public function toHexString ( ) : string { return '#' . sprintf ( '%02x' , $ this -> red ) . sprintf ( '%02x' , $ this -> green ) . sprintf ( '%02x' , $ this -> blue ) ; }
Gets the colour as a hex string.

@return string
Gets the colour as a hex string .