I want to create a new image, with color in background.
This working:
img = Image.new('RGB', (width,height), "red")
But I want to customize the color. , when I change "red" by "(228,150,150) it doesn't working....
Have you an idea to do this?
This is working for me. Note that the color tuple is not between quotes.
from PIL import Image
img = Image.new('RGB', (300, 200), (228, 150, 150))
img.show()
If it does not work for you, which version of Python and which version of PIL are you using?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With