spotifywebapipython.models.imagepalettecolors

@export
class ImagePaletteColors:

Image Palette Colors object.

This is a helper class, and is not part of the Spotify Web API specification.

ImagePaletteColors(root: list[typing.Tuple[int, int, int]] = None)

Initializes a new instance of the class.

Arguments:
  • root (list[Tuple[int, int, int]]): A list of color palette Tuple in the form (r, g, b) that contains extracted color palette information; otherwise, None.
ImageSource: str

Image that was processed to obtain the palette.

Items: list[spotifywebapipython.vibrant.models.Swatch]

Array of Swatch objects.

ItemsCount: int

Length of Items array.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeItems: bool = False) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeItems (bool): True to include the Items collection of objects; otherwise, False to only return base properties.