Let's start this chapter with the story how opal is formed in nature. There are a couple of theories, but we concentrate to most popular and major one.
It's believed that perhaps 30 million years ago, lots of silica was released into a solution which filled cracks in the rocks, layers in clay, and even some fossils. Some of them became precious opals. It takes about 5 to 6 million years to make a 1 cm opal to mature.
The evidence that Australia used to be under the sea is that many fossils of shells and fish bones have been found from inland of Australia, and some of those fossils were replaced by silica (see picture below "Shell Opal").
We already know that opal is made from silica combined with water. Some other components have been found inside opal, but we think these other components will just make it complicated in explaining.
Opal is a non-crystalline form of the mineral silica and is formed from amorphous "balls" or "lumps" of silica. So the opal is a very unique gem compared with others, like diamonds or a ruby which is formed crystalline. This is the reason why variation of colours are in opals.
When you were in school, you probably learn about triangular Prisms. Do you remember ? The tiny balls of silica in opal are working like "Prisms". The vast number of colours in opals are caused by the regular array of silica balls diffracting white light, and breaking the light into the colours of the light spectrum. The actual range of colour in a particular Opal is determined by the diameter and spacing of its silica balls (refer to figure below).
The next figures show you two types of arrangement of silica balls. Can you find out which one creates high quality opal? Yes, left is the one which makes good quality opal than right. The regularity of balls makes its colours and patterns richer.
Opals are made up from tiny uniformed spheres (balls) of transparent hard silica, which fit together in an orderly three dimensional frame (left diagram). It is the orderliness of the spheres that separates the precious opal from the common opal. These tiny spheres also determine colours and patterns of opals. The size of the spheres has a bearing on the colour produced. Smaller spheres bring out the blues, larger spheres produce the reds. And more and more uniform the spheres are placed, the more intense, brilliant and defined the colour will be.