Chalcedony is formed when the silicon in the quartz mixes with other elements, such as aluminum or iron. This creates a variety of colors and patterns in the chalcedony.