Document that getcolors() returns colors in the image mode [ci skip]

This commit is contained in:
Andrew Murray 2021-01-09 21:30:16 +11:00
parent cfff80ad76
commit 4eccadced4

View File

@ -1243,6 +1243,10 @@ class Image:
"""
Returns a list of colors used in this image.
The colors will be in the image's mode. For example, an RGB image will
return a tuple of (red, green, blue) color values, and a P image will
return the index of the color in the palette.
:param maxcolors: Maximum number of colors. If this number is
exceeded, this method returns None. The default limit is
256 colors.