XLogo lets you change the color of the pen, lift the pen, or change to an eraser. You can erase what is drawn only with an eraser following the same path that drew on the canvas.
To change the pen to an erase, use the penerase command. To set the color of the pen, use the setpc [r g b] command. In the setpc command, ‘r’, ‘g’ and ‘b’ represents the amount of red, green and blue, respectively, and each can be a value from 0 (black) to 255 (full intensity). For example, to set the pen to yellow, we use the command setpc[255 255 0].
Sometimes, you may want to move the turtle without tracing a line at the same time. You can lift the pen using the commend penup to lift the pen while moving the turtle. Once a pen is lift, you need to use the command pendown to put it back on the canvas.