Activities/Turtle Art: Difference between revisions
| Line 623: | Line 623: | ||
b -= 256 | b -= 256 | ||
rgb = "#%02x%02x%02x" % (r,g,b) | rgb = "#%02x%02x%02x" % (r,g,b) | ||
lc.tw.fgcolor = lc.tw.cm.alloc_color(rgb) | lc.tw.fgcolor = lc.tw.canvas.cm.alloc_color(rgb) | ||
return | return | ||
| Line 668: | Line 668: | ||
# reallocate current color | # reallocate current color | ||
rgb = "#%02x%02x%02x" % (r,g,b) | rgb = "#%02x%02x%02x" % (r,g,b) | ||
lc.tw.fgcolor = lc.tw.cm.alloc_color(rgb) | lc.tw.fgcolor = lc.tw.canvas.cm.alloc_color(rgb) | ||
return | return | ||