he initial or lowest layers of paint put down in a painting, before the details of the painting are put down. Some artists use underpainting to establish tonal values in a painting, effectively painting a monochrome version of the final painting to get all the tones right before adding color. Others use underpainting to establish areas of color as a first step in building up colors throughglazes.
Underpainting doesn't need to be done in gray, it can be done in any color(s). It can be very effective to create a coolor warm underpainting as a contrast to warm or cool colors in the final painting, letting the underpainting show through in small areas.
An underpainting done in greys or browns is known as grisaille. If you use green-greys, it's called verdaccio, and if you're using a transparent color it's called imprimatura.