public static function FromString( $objectString )
   {

      if ( false !== ( $rgb = ColorTool::Color2Rgb( $objectString ) ) )
      {
         return new Color(
            ColorTool::Rgb2Hex(
               $rgb[ 0 ],
               $rgb[ 1 ],
               $rgb[ 2 ]
            )
         );
      }

      if ( false !== ( $hex = self::RgbStringToHex( $objectString ) ) )
      {
         return new Color( $hex );
      }

      return new Color();

   }
public static function FromString( $objectString )
   {

      if ( false !== ( $rgb = ColorTool::Color2Rgb( $objectString ) ) )
      {
         return new Color(
            ColorTool::Rgb2Hex(
               $rgb[ 0 ],
               $rgb[ 1 ],
               $rgb[ 2 ]
            )
         );
      }

      if ( false !== ( $hex = self::RgbStringToHex( $objectString ) ) )
      {
         return new Color( $hex );
      }

      return new Color();

   }
public static function FromString ( $ objectString ) { if ( false !== ( $ rgb = ColorTool :: Color2Rgb ( $ objectString ) ) ) { return new Color ( ColorTool :: Rgb2Hex ( $ rgb [ 0 ] , $ rgb [ 1 ] , $ rgb [ 2 ] ) ) ; } if ( false !== ( $ hex = self :: RgbStringToHex ( $ objectString ) ) ) { return new Color ( $ hex ) ; } return new Color ( ) ; }
Init a new instance from defined string.

@param  string $objectString
@return \Beluga\Drawing\Color
Init a new instance from defined string .