Colour

Initial Setup

When creating shapes in Python Turtle Graphics, you can add colour to make your drawings more interesting. To fill a shape with colour, follow these steps:

  1. Use the fillcolor() command to choose a colour for the shape.
  2. Use begin_fill() to tell Python to start colouring.
  3. Draw the shape using movement commands such as forward() and left().
  4. Use end_fill() after the shape is finished.
  5. Python will fill the inside of the shape with the chosen colour.
from turtle import *
screen = getscreen()
tom = Turtle()

tom.fillcolor("Red")
tom.begin_fill()

# Draw a closed shape

tom.end_fill()

Colours

Example - Red Square

from turtle import *
screen = getscreen()
tom = Turtle()

tom.fillcolor("Red")
tom.begin_fill()

tom.forward(200)
tom.right(90)
tom.forward(200)
tom.right(90)
tom.forward(200)
tom.right(90)
tom.forward(200)
tom.right(90)

tom.end_fill()