It took me too long to realize I had used rgb values suitable for colormode(255) instead of the default colormode(1.). I know this is a rather small detail, but is not turtle directed to learners which we are hopefully making the path as easy as possible?
My example code:
#color_mode_range.py 12Jul2023, from color_mode_issue.py
"""
color((r,g,b)) out-of-range error not well stated
"""
from turtle import *
# Default colormode == 1.
rgb = (0,134,255) # cerulean, one shade
print("Setting color using color(", rgb, ")")
try:
color(rgb) # Set color
except Exception as ex:
print("oops... we get the error response:\n", ex)
cm = colormode()
print("Color value(s) out of range 0-", cm,
" would have been much more helpful", sep="")
Output
Setting color using color( (0, 134, 255) )
oops... we get the error response:
bad color sequence: (0, 134, 255)
Color value(s) out of range 0-1.0 would have been much more helpful