This rainbow was made using the rect function and the fill function. The first two numbers set the location of the upper-left corner, the third and fourth sets the width, and the fourth sets the height.
It is important to note that the third and fourth numbers are how far over and how far down using the blocks on your graph paper
The way these parameters are interpreted, however, may be changed with the rectMode() function.
To draw a rounded rectangle, add a fifth parameter, which is used as the radius value for all four corners.
Helpful Links