Set pen color
setpencolor color
setpc color
Set new color of a turtle's pen. 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).
Example:
wrap rt 90
setps 30
setpc {30 0 40}
fd 200 lt 180
setps 10
repeat 100 [setpc 10 * repcount fd 2]
Output: a drawing in the graphics window.
See also:
Table of Content