Restoration experts in Italy have discovered that the purple dye used in the Codex Purpureus Rossanensis - one of the oldest surviving New Testament manuscripts - was made from a combination of lichen and fermented urine.

The new analysis ends a centuries-old debate over how the ancient bookmakers, likely from Syria, were able to craft such an amazing book 1,500 years ago using primitive tools and limited resources.

"Even though early medieval illuminated manuscripts have been deeply studied from the historical standpoint, they have been rarely fully described in their material composition," lab director Marina Bicchieri, from the Central Institute for Restoration and Conservation of Archival and Library Heritage (ICRCPAL) in Rome, told Discovery News.

The discovery of the new ink came as the ICRCPAL was restoring the book, which is usually housed at the Museum of the Diocese in Rossano, a town in southern Italy.

It's believed that the codex, which was found inside the Cathedral of Rossano back in 1879, was first brought to Italy by monks, and was originally crafted in Syria, though no one knows when or exactly how this would have happened.

The 188-page codex contains the gospels of Matthew and Mark written in gold and silver ink. Sadly, the text is now incomplete because of a fire inside the cathedral. "Most likely, what we have today represents half of the original book," museum officials suggest.

Needless to say, the book is extremely fragile, making restoration projects all the more difficult. In fact, Bicchieri's team also has to deal with the damage left by an earlier restoration effort, conducted by an unnamed team around 1917, and which irreversibly modified some of the pages.

This time around, besides mending a few stitches to keep the book intact, the team at ICRCPAL decided to use X-rays to examine the composition of the inks used in the codex. They compared their findings with dyes recreated in the lab using recipes found in the Stockholm papyrus - a Greek ink recipe book that's been dated to around 300 AD.

The researchers report that the famed purple dye, which was once thought to be made out of Murex (sea snail), was actually made using orcein - a dye extracted from Roccella Tinctoria (lichen) - and sodium carbonate. The dye appears to have been processed using fermented urine too bring everything together.

"Fibre optics reflectance spectra (FORS) showed a perfect match between the purple parchment of the codex and a dye obtained with orcein and an addition of sodium carbonate," Bicchieri told Rosella Lorenzi at Discovery News.

This sodium carbonate likely came from the mineral natron - a table salt-like material that was used to mummify bodies in ancient Egypt, reports Lorenzi.

While the urine part of the dye seems pretty gross to us today, it was actually a very practical option, because urine was the only source of ammonia that was readily available 1,500 years ago.

The team's findings are still being prepared for publication, and have yet to be peer-reviewed, so we can only go on what they've told the media so far, but with further verification, they could put to rest the mystery of what the codex's purple ink is made from. 

We might never know how the book travelled from Syria to Italy in the first place, but previous hypotheses suggest that a travelling band of monks were the likely party.

The project is further evidence that non-invasive X-ray scans are quickly becoming the go-to method of study for archaeologists around the world. Last month, researchers studying King Tut's sarcophagus were able to use X-ray scans to reveal that the boy king was buried with a dagger made of space iron.   

To see more images of the colourful codex, check out the museum's site here.