Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Python Turtle accepts Tk color names and hex strings, as well as numeric RGB values. Numeric channels must match the active color mode: Turtle defaults to normalized values from 0 to 1, or you can call turtle.colormode(255) to use 8-bit values from 0 to 255. The complete named-color reference comes from Tk, not from a separate Turtle color list.
Python Turtle colors list: where to find the full list
Turtle color names are Tk color specifications. For the authoritative names and their 8-bit RGB values, use the Tk 9.0.2 color manual. It includes names in forms such as alice blue and AliceBlue, along with numbered variants such as aquamarine1 through aquamarine4. This is the Tk 9.0 reference; the names available to a program depend on the Tk version in its environment.
Python’s Turtle reference describes color strings as Tk color specifications and gives examples including "red" and "#33cc8c". See the Python 3.15.0rc3 Turtle documentation for the API details. Because that Python page is for a release candidate, check the stable Python documentation for the version you are using if version-specific behavior matters.
How do I use RGB colors in Turtle?
Choose the channel scale first. The default color mode is 1.0, which uses normalized channel values from 0 to 1. To use the familiar 8-bit RGB scale from 0 to 255, set the mode to 255 before passing the RGB values.
#1 Best Overall
import turtle
turtle.colormode(255)
turtle.pencolor(240, 160, 80)
You can supply RGB as a tuple as well. In normalized mode, for example, (0.2, 0.8, 0.55) is valid; in 255 mode, a value such as (50, 193, 143) uses 8-bit channels. Do not pass values like (240, 160, 80) while still in the default 1.0 mode: values outside the active range raise TurtleGraphicsError.
import turtle
turtle.colormode(1.0)
turtle.pencolor(0.2, 0.8, 0.55)
The supported input forms and numeric range behavior are documented in the Turtle color API reference and colormode documentation.
Rank #2
How do I set a hex color in Python Turtle?
Pass a Tk hex color string to a Turtle color function. For example, "#33cc8c" is a valid color specification. Hex strings state the color directly, while a name such as "red" is easier to read; both string forms follow Tk’s color specification rules.
import turtle
turtle.pencolor("#33cc8c")
turtle.fillcolor("#a0c8f0")
Which Turtle color function should I use?
| Function | What it changes | Example |
|---|---|---|
pencolor |
Pen color, including polygon outlines | turtle.pencolor("red") |
fillcolor |
Interior color used when filling a polygon | turtle.fillcolor("#33cc8c") |
color |
Both pen and fill when given one color; separate pen and fill colors when given two | turtle.color("red", "#a0c8f0") |
bgcolor |
Screen background | turtle.bgcolor("black") |
Here is the same set of roles in one short example:
Free tools Windows power users keep installed
One-click scans. No signup required.
import turtle
turtle.colormode(255)
turtle.pencolor(240, 160, 80)
turtle.fillcolor("#33cc8c")
turtle.color("red", "#a0c8f0")
turtle.bgcolor("black")
When color receives one color, it sets pen and fill together; when it receives separate pen and fill colors, it assigns them independently. Use pencolor or fillcolor when you only want to change one role.
What does turtle.colormode(255) do?
turtle.colormode(255) changes how Turtle interprets numeric RGB channels, allowing each channel to use the 0–255 scale. The documented alternatives are 1.0 (the default, for values from 0 to 1) and 255. This setting affects numeric RGB input; color names and Tk hex strings remain string specifications.
Set the mode before passing numeric channels so the values you provide fit the selected range. A mode mismatch is a common cause of TurtleGraphicsError.
What if Turtle will not start?
Turtle graphics depends on tkinter. Python’s documentation notes that some Linux distributions and other platforms package the optional Tk interface separately. If importing or launching Turtle fails before you reach color code, check whether Tk support is installed for your Python environment.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




