Ask coding questions

← Back to all posts
I need help using the RGB color for the turtle.
AqualRodinia

I need help using the RGB color for the turtle.

Voters
VALERIELEN
AqualRodinia
Comments
hotnewtop
SixBeeps

The color mode could be set to 255. You can set it to 1 by calling screen.colormode(1)

AqualRodinia

@SixBeeps "NameError: name 'screen' is not defined on line 10"

SixBeeps

@AqualRodinia Oh, you never defined the screen.
screen = turtle.Screen()

AqualRodinia

@SixBeeps AttributeError: 'Screen' object has no attribute 'colormode' on line 10

SixBeeps

@AqualRodinia Lemme tell you how much I dislike Python with Turtle. They document things that used to exist, then deprecate them without warning.
colormode() is a function directly in the turtle module. Ultimately, it should just be turtle.colormode(1), but I wouldn't be surprised if that didn't work either. I'm basing my answer off of here, but who knows.