From the Lonely Planet, I learned this:

‘The port that is today called Essaouira was hot property in ancient times because it had one thing everyone wanted: the color purple. Imperial purple couldn’t be fabricated and was the one color strictly reserved for Roman royalty. This helps explain the exorbitant asking price, which according to Aristotle was 10 to 20 times its weight in gold. The natural dye came from the spiky murex marine snails that clung to the remote Purpuraire (Purple) Islands.

Technically the Phoenicians were there first and discovered the stuff, but everyone wanted purple power. Savvy King Juba II established a coastal dye works in the 1st century BC to perform the tricky task of extracting murex dye from the vein of the mollusk, and kept his methods a closely guarded secret.The hue became wildly popular among royal celebrities of the day. Clepatra loved the purple so much that she dyed the sails of her royal barge purple to meet Mark Antony.

But violet soon turned to violent. Legend has it that Juba’s son Ptolemy was murdered by Emperor Caligula for having the audacity to sport a purple robe, making the trendy Ptolemy possibly the world’s first fashion victim. The bright, unfading dye was never successfully produced commercially and the secret extraction methods were assumed lost in the siege of Constantinople in 1453. But in Essaouira the stuff is mysteriously still available, for a price. The mysteries of the color purple still passed down from one generation of murex collectors to the next, and jealously guarded.’

Interesting. Next time I visit, I’ll go on a quest to learn more about this.