The color of volcanic rock depends on its mineral composition. Rocks rich in iron and magnesium tend to be darker, while those with more silica usually appear lighter. This variation results from the different conditions under which the rocks form.