Available colors in turtle
Feb 20, 2020
There are several ways to specify colors in turtle. The
documentation
for the pencolor
function shows the different approaches:
- You can use string names like
"red"
. This link shows the available colors by name. The names are not case sensitive in Python, i.e., there is no need to capitalize the names as shown in the link. - You can use hex strings with the RGB color, e.g.
"#ff0000"
for red. This online color picker can can help you determine the hex string for a color. - You can specify the color as three numerical arguments with the RGB values. By default those numbers need to be floats in the range 0-1.