From 93a8e43ddf1ff33961d2d50f369b6440ab4a49e4 Mon Sep 17 00:00:00 2001 From: Sandy Date: Thu, 20 Aug 2015 15:25:08 -0400 Subject: [PATCH] ImagePalette: Add param documentation --- PIL/ImagePalette.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/PIL/ImagePalette.py b/PIL/ImagePalette.py index 5aabaa138..f80259f04 100644 --- a/PIL/ImagePalette.py +++ b/PIL/ImagePalette.py @@ -22,7 +22,19 @@ from PIL import ImageColor 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