Skip to content
← Back to Community
I need help using the RGB color for the turtle.
Profile icon
AqualRodinia

I need help using the RGB color for the turtle.

Voters
Profile icon
VALERIELEN
Profile icon
AqualRodinia
Comments
hotnewtop
Profile icon
SixBeeps

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

Profile icon
AqualRodinia

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

Profile icon
SixBeeps

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

Profile icon
AqualRodinia

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

Profile icon
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.

Profile icon
Priya843

@SixBeeps
thanks it worked