RGB is three bytes. L is greyscale. convert('L') drops color.
Goal
Convert a red square to L and print a pixel.
from PIL import Image
im = Image.new('RGB', (16, 16), (200, 40, 40))
g = im.convert('L')
print(g.mode, g.getpixel((0, 0)))from PIL import Image
print(Image.new('RGB', (4, 4), (0, 128, 64)).convert('RGBA').mode)from PIL import Image
im = Image.new('L', (20, 20), 128)
plt.imshow(im, cmap='gray')
plt.axis('off')
plt.show()
print(im.mode)from PIL import Image
print(Image.new('RGB', (2, 2), (255, 255, 255)).convert('1').getpixel((0, 0)))