Reputation: 63
How do you change what color the turtle looks, not the pen? I want the turtle to draw white on the screen, but if I change the color to 'white' I can't see the turtle anymore. Is there something like turtle.turtlecolor
or something?
Upvotes: 3
Views: 1934
Reputation: 41872
We can disconnect the color of the cursor (both outline and fill) from the color drawn by the cursor (both outline and fill) using the user cursor definition functions:
from turtle import Screen, Shape, Turtle
screen = Screen()
screen.bgcolor('black')
turtle = Turtle()
turtle.shape("turtle")
polygon = turtle.get_shapepoly()
fixed_color_turtle = Shape("compound")
fixed_color_turtle.addcomponent(polygon, "orange", "blue")
screen.register_shape('fixed', fixed_color_turtle)
turtle.shape('fixed')
turtle.color('white')
turtle.circle(150)
screen.exitonclick()
This turtle cursor is orange with a blue outline but it draws a white line:
Upvotes: 4
Reputation: 41
There sure is!
turtle.shape("turtle")
turtle.fillcolor("red")
Now you get a red turtle.
Upvotes: 1