Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Create First Image

  • Image
  • size
  • color
from PIL import Image

img = Image.new('RGB', size=(100, 60), color='#eb8634')
img.save('first.png')
img.show()     # Using ImageMagic on Linux
  • Color can be one of the well-known names e.g. "red"
  • Color can be RGB in decimal or hex. (RGB=Red Green Blue)