Learn Before
Concept
Color Modes
Color modes are strings that refer to the the type and depth of pixels in an image. They are a property of images and they are also used in function arguments. Color modes are measured in bits, referring to how much data can be stored in a pixel. Color modes that support a larger number of bits can store more data, and thus more color, in a pixel. There are many color modes in Pillow, but the most common ones are the following:
- "1" - 1-bit pixels. Black-and-white only.
- "L" - 8-bit pixels. Grayscale.
- "RGB" - 3x8-bit pixels. Separates a pixel into primary colors. Full color.
- "RGBA" - 4x8-bit pixels. RGB with transparency support.
- "CMYK" - 4x8-bit pixels. Alternate way to separate a pixel into primary colors.
0
1
Updated 2021-07-17
Tags
Python Programming Language
Data Science