public function setRGB( $rgbValue ) : Color
   {

      if ( \is_string( $rgbValue ) )
      {
         $this->setRGBString( $rgbValue );
      }
      else if ( \is_array( $rgbValue ) && \count( $rgbValue ) > 2 )
      {
         $this->setRGBArray( $rgbValue );
      }
      else
      {
         throw new ArgumentError(
            'rgbValue',
            $rgbValue,
            'Drawing',
            'Illegal RGB-Value Format!'
         );
      }

      return $this;

   }
public function setRGB( $rgbValue ) : Color
   {

      if ( \is_string( $rgbValue ) )
      {
         $this->setRGBString( $rgbValue );
      }
      else if ( \is_array( $rgbValue ) && \count( $rgbValue ) > 2 )
      {
         $this->setRGBArray( $rgbValue );
      }
      else
      {
         throw new ArgumentError(
            'rgbValue',
            $rgbValue,
            'Drawing',
            'Illegal RGB-Value Format!'
         );
      }

      return $this;

   }
public function setRGB ( $ rgbValue ) : Color { if ( \ is_string ( $ rgbValue ) ) { $ this -> setRGBString ( $ rgbValue ) ; } else if ( \ is_array ( $ rgbValue ) && \ count ( $ rgbValue ) > 2 ) { $ this -> setRGBArray ( $ rgbValue ) ; } else { throw new ArgumentError ( 'rgbValue' , $ rgbValue , 'Drawing' , 'Illegal RGB-Value Format!' ) ; } return $ this ; }
Sets a new color, defined by a valid RGB value.

If a string is used the following formats are valid: 'rgb(r,g,b)' or 'r,g,b'

Or a array (0=r,1=g,2=b) or associative with keys 'r'|'red', 'g'|'green', 'b'|'blue'

@param  string|array $rgbValue
@return \Beluga\Drawing\Color
@throws \Beluga\ArgumentError
Sets a new color defined by a valid RGB value .