SETPENCOLORcolor
SETPENCOLOURcolor
SETPCcolor
Sets the pen color to color
, which can either be a color index or a color vector.
A color index is a number from 0 - 15.
A color vector is a list of [red green blue] intensities, each in the range of 0 - 255.
For an explanation of the color
input, see the section on Using Color.
The pen color affects any line drawn by the turtle (such as FORWARD). It also affects text that is drawn with LABEL.
Drawing lines in different shades of red:
REPEAT 255 [
SETPENCOLOR (LIST REPCOUNT 0 0)
FORWARD 100
BACK 100
RIGHT 1
]
Using variables in a color vector:
MAKE "red 100
MAKE "green 100
MAKE "blue 100
SETPENCOLOR (LIST :red :green :blue)