  Nitrogen-doped lutetium hydride has recently been proposed as a
near-ambient-conditions superconductor. Interestingly, the sample transforms
from blue to pink to red as a function of pressure, but only the pink phase is
claimed to be superconducting. Subsequent experimental studies have failed to
reproduce the superconductivity, but have observed pressure-driven colour
changes including blue, pink, red, violet, and orange. However, discrepancies
exist among these experiments regarding the sequence and pressure at which
these colour changes occur. Given the claimed relationship between colour and
superconductivity, understanding colour changes in nitrogen-doped lutetium
hydride may hold the key to clarifying the possible superconductivity in this
compound. Here, we present a full microscopic theory of colour in lutetium
hydride, revealing that hydrogen-deficient LuH$_2$ is the only phase which
exhibits colour changes under pressure consistent with experimental reports,
with a sequence blue-violet-pink-red-orange. The concentration of hydrogen
vacancies controls the precise sequence and pressure of colour changes,
rationalising seemingly contradictory experiments. Nitrogen doping also
modifies the colour of LuH$_2$ but it plays a secondary role compared to
hydrogen vacancies. Therefore, we propose hydrogen-deficient LuH$_2$ as the key
phase for exploring the superconductivity claim in the lutetium-hydrogen
system. Finally, we find no phonon-mediated superconductivity near room
temperature in the pink phase.
