color

Know that colors are made by combining red, green, and blue in different amounts ( within the range 0-255 ).

Know how to set a Robot's pen color and to set a shape's color in Processing.

Colors are made by combining red, green and blue light (RGB). The amount of each color is determined by a number between 0 and 255 for each of Red, Green, and Blue (RGB).

Processing provides the fill() command to set the current color like this:
fill(255,0,0);
The first number reperesents the amount of red, the second green, the third blue. So the above code sets the drawing color to red.

If we wanted to set a Robot's pen color to red in a Java program, we could use either of the following:
rob.setPenColor(Color.RED);
rob.setPenColor(new Color(255,0,0));