code: def new(cls, mode, size, color=0, depth=8, **kwargs):
          
          header = cls._make_header(mode, size, depth)
          image_data = ImageData.new(header, color=color, **kwargs)
          # TODO: Add default metadata.
          return cls(PSD(
              header=header,
              image_data=image_data,
              image_resources=ImageResources.new(),
          ))
docs: Create a new PSD document.
  
          :param mode: The color mode to use for the new image.
          :param size: A tuple containing (width, height) in pixels.
          :param color: What color to use for the image. Default is black.
          :return: A :py:class:`~psd_tools.api.psd_image.PSDImage` object.