If magma contains a high concentration of iron, magnesium, and other dark-coloured minerals, the resulting rock will be dark in colour. For example, basalt is a dark-coloured rock that forms from the cooling of magma with high iron and magnesium content.
Furthermore, pumice contains many microscopic bubbles, which scatter light in all directions. This gives pumice its characteristic frothy and lightweight appearance and contributes to its white color.