diff --git a/src/PIL/WebPImagePlugin.py b/src/PIL/WebPImagePlugin.py index 7dd3f5272..2101271c4 100644 --- a/src/PIL/WebPImagePlugin.py +++ b/src/PIL/WebPImagePlugin.py @@ -222,7 +222,7 @@ def _save_all(im, fp, filename): if ( not isinstance(background, (list, tuple)) or len(background) != 4 - or not all(v >= 0 and v < 256 for v in background) + or not all(0 <= v < 256 for v in background) ): raise OSError( "Background color is not an RGBA tuple clamped to (0-255): %s"