I have this code:
from PIL import Image, ImageColor
i = Image.new('1', (1, 1))
i.putpixel((0, 0), ImageColor.getcolor('black','1'))
i.save('simplePixel.png')
taken from this answer.
Running this produces a 1 pixel image that is black. If I change the color to red, for example:
ImageColor.getcolor('red','1')
I get a white pixel instead of red. I've tried yellow, green blue; they all result in a white pixel. How can I fix this?