Onyx is formed by the deposition of silica in gas cavities in lava, which results in the distinctive bands or stripes we see in the stone. They come in varied shades of red, orange, and brown, which often alternate with striking bands of white. The banding in onyx is straight, and is either brown or black and white, while curved bands occur in the variety of quartz known as agate. Since ancient Egyptian times, onyx has been stained to improve or change its color. Natural black onyx is rare, so the commercial black variety is usually agate that has been stained by the sugar-sulfuric acid treatment, soaked in sugar and then heated in sulfuric acid to carbonize the sugar. It may be banded or solid black.