public static function FromArray( array $objectData )
   {

      if ( \count( $objectData ) == 3 )
      {
         if ( false !== ( $hex = ColorTool::Color2Hex( $objectData ) ) )
         {
            return new Color( $hex );
         }
      }

      $rgb = array();

      if ( isset( $objectData[ 'r' ] ) )
      {
         $rgb[ 0 ] = \intval( $objectData[ 'r' ] );
      }
      else if ( isset( $objectData[ 'red' ] ) )
      {
         $rgb[ 0 ] = \intval( $objectData[ 'red' ] );
      }
      else if ( isset( $objectData[ 'Red' ] ) )
      {
         $rgb[ 0 ] = \intval( $objectData[ 'Red' ] );
      }
      else
      {
         return new Color();
      }

      if ( isset( $objectData[ 'g' ] ) )
      {
         $rgb[ 1 ] = \intval( $objectData[ 'g' ] );
      }
      else if ( isset( $objectData[ 'green' ] ) )
      {
         $rgb[ 1 ] = \intval( $objectData[ 'green' ] );
      }
      else if ( isset( $objectData[ 'Green' ] ) )
      {
         $rgb[ 1 ] = \intval( $objectData[ 'Green' ] );
      }
      else
      {
         return new Color();
      }

      if ( isset( $objectData[ 'b' ] ) )
      {
         $rgb[ 2 ] = \intval( $objectData[ 'b' ] );
      }
      else if ( isset( $objectData[ 'blue' ] ) )
      {
         $rgb[ 2 ] = \intval( $objectData[ 'blue' ] );
      }
      else if ( isset( $objectData[ 'Blue' ] ) )
      {
         $rgb[ 2 ] = \intval( $objectData[ 'Blue' ] );
      }
      else
      {
         return new Color();
      }

      if ( false !== ( $hex = ColorTool::Rgb2Hex( $rgb ) ) )
      {
         return new Color( $hex );
      }

      return new Color();

   }