Visible-range absorption spectroscopy by diffraction grating, calibrated against mercury emission lines. This is the method gemmological laboratories have used for over a century, and it is what a hand spectroscope does — the phone simply measures it instead of asking your eye to judge it.
A diffraction grating separates the light. 1000 ruled lines per millimetre make each wavelength interfere constructively at its own angle, so white light spreads into an ordered band — position along it is wavelength.
The camera sensor measures intensity across that band — averaged down forty rows of pixels to raise the signal above the noise.
Two mercury lines fix the scale. Every fluorescent lamp emits at 435.8 nm and 546.1 nm — atomic transitions of mercury, physical constants, identical in every lamp on earth. Two points define the linear dispersion, so the axis is anchored to physics rather than to a guess.
Absorbance comes from Beer–Lambert: A = log₁₀(I₀ / I) — the lamp alone against the lamp through the stone, wavelength by wavelength.
The bands identify the element doing the colouring. Transition-metal ions have discrete electron energy levels, so each absorbs at its own wavelengths: Cr³⁺, Fe²⁺, Fe³⁺, Co²⁺, Mn²⁺, U⁴⁺. Reading the positions reads the chromophore — that is a chemical determination made with light.
What it determines: which transition metal is colouring the specimen, and
therefore very often the species — ruby from red spinel, almandine from pyrope, natural blue from cobalt glass,
dyed jadeite from natural.
What it does not determine: crystal structure. That needs X-ray diffraction,
which requires a tube at tens of kilovolts and a goniometer reading to a hundredth of a degree —
no phone has an X-ray source and none can have one. These two methods answer different questions:
XRD asks how the atoms are arranged, this asks which atoms are absorbing the light.
Point it at an ordinary fluorescent tube or compact fluorescent lamp. Those have sharp mercury lines at exactly 435.8 nm (violet-blue) and 546 nm (green) — the standard calibration, and accurate to a nanometre or two. Tap each line on the plot when asked.
Record the lamp on its own as the reference. Then put the stone between the lamp and the grating — transmitted light for anything translucent, or reflected light off the surface — and record the sample. Absorbance is computed from the two.
A diffraction grating film — 1000 lines/mm, sold for a few coins as "spectroscopy film"
or a cardboard spectroscope. Tape a small square over the rear lens, off to one side, and point the phone so the
lamp is beside the field of view: the spectrum appears as a rainbow band across the frame. Line the green sampling
band up with it.
A cheap plastic hand spectroscope also works — hold the phone camera to its eyepiece.