Onyx primarily refers to the parallel-banded variety of chalcedony, an oxide mineral. Agate and onyx are both varieties of layered chalcedony that differ only in the form of the bands; agate has curved bands while onyx has parallel bands. The colors of its bands range from black to almost every color. Specimens of onyx commonly contain bands of black and/or white. Onyx, as a descriptive term, has also been applied to parallel-banded varieties of alabaster, marble, calcite, obsidian, and opal, and misleadingly to materials with contorted banding, such as "cave onyx" and "Mexican onyx".
Onyx comes through Latin (of the same spelling), from the Ancient Greek ὄνυξ, meaning "claw" or "fingernail". Onyx with flesh-colored and white bands can sometimes resemble a fingernail. The English word "nail" is cognate with the Greek word.
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 also commonly been used to label other banded materials, such as banded calcite found in Mexico, India, 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.