Skip to content

Commit

Permalink
Merge pull request #1381 from bwrsandman/patch-1
Browse files Browse the repository at this point in the history
ImagePalette: Add param documentation
  • Loading branch information
wiredfool committed Sep 9, 2015
2 parents a7d4d1e + 93a8e43 commit 5473766
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion PIL/ImagePalette.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@


class ImagePalette(object):
"Color palette for palette mapped images"
"""
Color palette for palette mapped images
:param mode: The mode to use for the Palette. See:
:ref:`concept-modes`. Defaults to "RGB"
:param palette: An optional palette. If given, it must be a bytearray,
an array or a list of ints between 0-255 and of length ``size``
times the number of colors in ``mode``. The list must be aligned
by channel (All R values must be contiguous in the list before G
and B values.) Defaults to 0 through 255 per channel.
:param size: An optional palette size. If given, it cannot be equal to
or greater than 256. Defaults to 0.
"""

def __init__(self, mode="RGB", palette=None, size=0):
self.mode = mode
Expand Down

0 comments on commit 5473766

Please sign in to comment.