Turtles have two colors, their outline color, which they draw with, known as the pen color and their body color, which they fill with, known as their fill color. There are separate methods for setting and retrieving pen and fill color, pencolor()
and fillcolor()
, one of which is likely what you want:
if turtle.pencolor() != 'gray':
color = input("Type some color: ")
turtle.pencolor(color)
Turtle's color()
method is used to set both the pen and fill color, which is why it will accept and return two colors. (If given only one color, it will set both the pen and fill color to that same color.) It's a convenience function but generally not what you want when interrogating a turtle's color(s).