The students extracted the violet pigment from red cabbage by boiling the cabbage and filtering the pigment solution. They identified the pigment's chemical formula and observed in a graph that it strongly absorbs violet and green light, which explains its color, but does not absorb red or blue light.