I am using PIL to make pictures pixel by pixel. I notice that while I am specifying various shades of gray to my input, the output image is always in various shades of red. For example, I would assume that the following:
im = Image.new("RGB", (100, 100), "black")
im.putpixel((1,9), ImageColor.getcolor('rgb(255,255,255)', '1'))
im.putpixel((1,1), ImageColor.getcolor('rgb(55,55,55)', '1'))
im.save('test.png')
would create one gray pixel and one white pixel, however this creates two red pixels, with the "gray" pixel being a darker shade of red (see below). Why is this happening and how can I get the expected output of a gray and white pixel.