Reputation: 503
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?
Upvotes: 14
Views: 19740
Reputation: 6858
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?
Upvotes: 22