Lesson 13 of 51 · Colors & Styling
Background Color
Set the canvas background color with bgcolor().
Python
from turtle import *
bgcolor("midnightblue")
color("white")
pensize(3)
for i in range(5):
forward(100)
right(144)
done()Output

1
Named or RGB
bgcolor("black") or bgcolor(20, 20, 30) — both work.