Built by the last of Spain's Muslim rulers, the Alhambra is a regal palace that has shimmered over the city of Granada for 800 years. Throughout the day its colors seem to shift, standing out as a terracotta orange beacon under a midday Sun before giving way to red-pinkish hues in dusk's fading light.

On the inside, in the Alhambra's gilded halls, the palace has been slowly changing color too. After centuries of natural weathering, parts of the palace's golden flanks and ornate, whitewashed walls are turning a patchy, dull purple – a stain two scientists think they can finally explain.

"Its origin remained unknown until now," write University of Granada mineralogist Carolina Cardell and microscopy specialist Isabel Guerra in their published paper, which outlines how technological advances made it possible for the pair to 'peel back' the layers of the Alhambra's weathered walls.

Gold is one of the least reactive metals, so it should stand the test of time. The precious metal is resistant to sunlight, humidity, air pollution, and baking temperatures, which is why it is such a prized material for crafting jewelry, coins, and more recently, electronic devices – all things you don't want to degrade.

Soft and malleable, gold was also used to decorate palaces, ornaments, arms and armor, and artworks using a technique called gilding. In the case of the Alhambra, wafer-thin gold leaf overlaid on sheets of pliable tin originally decorated the palace walls. But over time the surfaces turned an odd purple color, and were promptly covered over with white gypsum coating in the 19th century.

The transformation of gold's warm glow to a bruised purple is a trick of chemistry understood since ancient times. Typically induced by a mixture of nitric and hydrochloric acid known as nitric acid hydrochloride, or aquia regia, Roman alchemists used the technique to color glass as far back as the 4th century. The aqua regia reaction dissolves gold into tiny particles, which – as inventor and scientist Michael Faraday suggested in 1856 – scatter light into ruby-reds, purples and blues.

Yet to date, no signs of nitric acid hydrochloride have been detected on the Alhambra's walls. Without aqua regia in the mix, a different chemical process had to be creating the hue change inside the Alhambra.

Cardell and Guerra set out to investigate, using a scanning electron microscope equipped with an array of spectrometers to reveal the chemical composition of the Alhambra's gold-lined features, down to the nano-scale.

After studying the Alhambra's centuries-old walls and modelling the chemical weathering that likely ensued, the researchers found an "unexpected combination of electrochemical processes" might have shaded the damaged surfaces purple.

Close-up images of the purple discoloration on the Alhambra palace walls.
Close-up images of the Alhambra's discolored walls. (Cardell & Guerra, Science Advances, 2022)

Cardell and Guerra found crater-shaped voids and fissures in the gold leaf, channels through which moisture could reach the underlying tin foil and corrode it, when the walls were free of grime.

But where the walls were covered in grime, the gold had corroded instead. Stripped of its electrons, the gold gradually degraded and spontaneously formed gold nanoparticles roughly 70 nanometers in diameter that, Cardell and Guerra say, are the right size to scatter a spread of light waves that make it appear purple.

However, not everyone is convinced that this corrosion process produced the color change.

Catherine Louis, a chemist at the Surface Reactivity Laboratory (LRS) in Paris, speaking with APS Physics, said it's amazing that golden material can turn purple over time, but pointed out that the researchers did not perform any experimental tests to try and reproduce their proposed corrosion process.

Replicating five centuries of weathering in lab experiments would be a tall order, though, and wouldn't necessarily yield very informative results, Cardell and Guerra argue in their paper.

"Our research is done on a real case study of more than five centuries of weathering under natural conditions, limiting our ability to elucidate the exact corrosion model," the duo writes.

They also suspect that the presence of gold nanoparticles and the deterioration of bimetallic gildings are likely more widespread than architectural heritage experts have noticed because few surfaces would be covered with a whitish layer like the Alhambra's gilded halls were.

"The results shown here will hopefully help experts of ancient gilded objects with the information relevant to corrosion methods and materials of intervention, as well as corrosion prevention," Cardell and Guerra conclude.

The study was published in Science Advances.