我正在将 python turtle 用于需要海龟来绘制字符的项目。但是,当我尝试将 RGB 值用于颜色时,我不断收到错误消息。输入是:
turtle.color((151,2,1))
紧接着是一连串的动作。但是,当我运行程序时,我收到以下消息:
File "C:/Users/Larry/Desktop/tests.py", line 5, in center
turtle.color((151,2,1))
File "<string>", line 1, in color
File "C:\Python33\lib\turtle.py", line 2208, in color
pcolor = self._colorstr(pcolor)
File "C:\Python33\lib\turtle.py", line 2688, in _colorstr
return self.screen._colorstr(args)
File "C:\Python33\lib\turtle.py", line 1158, in _colorstr
raise TurtleGraphicsError("bad color sequence: %s" % str(color))
turtle.TurtleGraphicsError: bad color sequence: (151, 2, 1)
这是什么意思,我该如何解决?