Set color of a turtle's icon
setturtlecolor color
settc color
Sets the new color of turtle's icon. The initial icon's color is black: {0 0 0 100}. Setting the new
value will cause the turtle's icon is repainted, with no changes in the opacity channel (alpha).
Color can be specified as a name, index in the current palette of colors or a list or array of
color compunds: {r g b}
or {r g b opacity}
. The range of compoud values is from 0
(off) to 100 (full brightness), opacity values are from 0 (transparent) to 100 (opaque). Opacity will be merged
with the opacity values present in the current icon.
Example:
print tc
settc "red
print tc
Output:
(also chenges in the turtle's icon color)
{0 0 0 100}
{100 0 0 100}
See also:
Table of Content