next up previous contents index
Next: Animation Mode Up: Movement of the turtle; Previous: Fog effect   Contents   Index

A word on colors

Colors are defined in XLogo with a list of three numbers [r g b] between 0 and 255. The number r is the red component, b the blue and g the green. Xlogo has 16 predefined colours: you can access with their rgb list, with a number, or with a primitive. look at this table:
Number Primitives [R G B] Color
0 black [0 0 0]

\includegraphics[width=1 cm]{pics/couleur0.eps}
1 red [255 0 0]

\includegraphics[width=1 cm]{pics/couleur1.eps}
2 green [0 255 0]

\includegraphics[width=1 cm]{pics/couleur2.eps}
3 yellow [255 255 0]

\includegraphics[width=1 cm]{pics/couleur3.eps}
4 blue [0 0 255]

\includegraphics[width=1 cm]{pics/couleur4.eps}
5 magenta [255 0 255]

\includegraphics[width=1 cm]{pics/couleur5.eps}
6 cyan [0 255 255]

\includegraphics[width=1 cm]{pics/couleur6.eps}
7 white [255 255 255]

\includegraphics[width=1 cm]{pics/couleur7.eps}
8 gray [128 128 128]

\includegraphics[width=1 cm]{pics/couleur8.eps}
9 lightgray [192 192 192]

\includegraphics[width=1 cm]{pics/couleur9.eps}
10 darkred [128 0 0]

\includegraphics[width=1 cm]{pics/couleur10.eps}
11 darkgreen [0 128 0]

\includegraphics[width=1 cm]{pics/couleur11.eps}
12 darkblue [0 0 128]

\includegraphics[width=1 cm]{pics/couleur12.eps}
13 orange [255 200 0]

\includegraphics[width=1 cm]{pics/couleur13.eps}
14 pink [255 175 175]

\includegraphics[width=1 cm]{pics/couleur14.eps}
15 purple [128 0 255]

\includegraphics[width=1 cm]{pics/couleur15.eps}
16 brown [153 102 0]

\includegraphics[width=1 cm]{pics/couleur16.eps}
# These three instructions are the same
setsc orange
setsc 13
setsc [255 200 0]

next up previous contents index
Next: Animation Mode Up: Movement of the turtle; Previous: Fog effect   Contents   Index
Loïc 2008-06-08