Next: Animation Mode
Up: Movement of the turtle;
Previous: Fog effect
Contents
Index
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] |
|
1 |
red |
[255 0 0] |
|
2 |
green |
[0 255 0] |
|
3 |
yellow |
[255 255 0] |
|
4 |
blue |
[0 0 255] |
|
5 |
magenta |
[255 0 255] |
|
6 |
cyan |
[0 255 255] |
|
7 |
white |
[255 255 255] |
|
8 |
gray |
[128 128 128] |
|
9 |
lightgray |
[192 192 192] |
|
10 |
darkred |
[128 0 0] |
|
11 |
darkgreen |
[0 128 0] |
|
12 |
darkblue |
[0 0 128] |
|
13 |
orange |
[255 200 0] |
|
14 |
pink |
[255 175 175] |
|
15 |
purple |
[128 0 255] |
|
16 |
brown |
[153 102 0] |
|
# These three instructions are the same
setsc orange
setsc 13
setsc [255 200 0]
Next: Animation Mode
Up: Movement of the turtle;
Previous: Fog effect
Contents
Index
Loïc
2008-06-08