Skip to content

Deprecated Lab — Trinket is shutting down

This lab was written for Trinket.io, which is shutting down in August 2026. The embedded trinket.io links on this page will stop working after that date.

These pages are kept for reference only. The current version of this course now runs every lab as an inline Skulpt editor right in the page — no account or install needed. Start at Chapter 1: Welcome to Python.

Color Picker

You are not limited to the colors by name Trinket Colors. You can use Hex and RGB values and let your imagination run wild.

Color Picker

Example code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import turtle

#turtle.setup(400,500)
wn = turtle.Screen()
wn.setup(400,500)
#turtle.title("Tess becomes a traffic light!")
wn.bgcolor("A7E30E")
tess = turtle.Turtle()
tess.color('#FA057F')
style = ('Arial', 40, 'bold')
tess.write('Hello', font=style, align='Center')
tess.hideturtle()

Experiments

Can you try different colors? Can you change font properties in style object?

The font name can as 'Arial', 'Courier', or 'Times New Roman' The font size in pixels. The font type, which can be 'normal', 'bold', or 'italic'