Onyx is a banded variety of the oxide mineral chalcedony. Agate and onyx are both varieties of layered chalcedony that differ only in the form of the bands: agate has curved bands and onyx has parallel bands. The colors of its bands range from white to almost every color (save some shades, such as purple or blue). Commonly, specimens of onyx contain bands of black and/or white.
Onyx is formed of bands of chalcedony in alternating colors. It is cryptocrystalline, consisting of fine intergrowths of the silica minerals quartz and moganite. Its bands are parallel to one another, as opposed to the more chaotic banding that often occurs in agates. Sardonyx is a variant in which the colored bands are sard (shades of red) rather than black. Black onyx is perhaps the most famous variety, but is not as common as onyx with colored bands. Artificial treatments have been used since ancient times to produce both the black color in "black onyx" and the reds and yellows in sardonyx. Most "black onyx" on the market is artificially colored. The name has sometimes been used, incorrectly, to label other banded lapidary materials, such as banded calcite found in Mexico, Pakistan, and other places, and often carved, polished and sold. This material is much softer than true onyx, and much more readily available. The majority of carved items sold as "onyx" today are this carbonate material. Artificial onyx types have also been produced from common chalcedony and plain agates. The first-century naturalist Pliny the Elder described these techniques being used in Roman times. Treatments for producing black and other colors include soaking or boiling chalcedony in sugar solutions, then treating with sulfuric or hydrochloric acid to carbonize sugars which had been absorbed into the top layers of the stone.These techniques are still used, as well as other dyeing treatments, and most so-called "black onyx" sold is artificially treated. In addition to dye treatments, heating and treatment with nitric acid have been used to lighten or eliminate undesirable colors.