You've probably clocked the yellow and red flags flying at busy beaches — but the purple one tends to catch holidaymakers off guard. It's not a warning about sharks, as many assume. A purple flag means marine pests are present: jellyfish, Portuguese man-of-war, stingrays and other creatures that could sting or injure you in the water.

The colour system comes from the International Life Saving Federation, which set out universal flag guidelines in 2004. More than 100 countries belong to the ILSF, and the United States is among those using the standard colours on popular public beaches. Lifeguards and local authorities raise the flags each morning to sum up the day's conditions before anyone dips a toe in.

The rest of the lineup is worth knowing too. Yellow means moderate hazard — swim with care. Red signals high danger, and double red flags mean the water is closed outright. (Green flags, oddly, were scrapped because no beach can ever guarantee perfectly safe conditions.) If a shark has actually been spotted, you're more likely to see a red-and-white quartered flag signalling an emergency evacuation, or the water closed under double reds. And keep in mind that no flag at all doesn't guarantee nothing's out there — situational awareness still applies.

So what should you actually do when the purple flag is up? The safest option is simple: stay dry. Unlike a double red, purple doesn't forbid swimming — it's a heads-up rather than a ban. If you're set on getting in the water, ask the lifeguards first. They can tell you what kind of creatures are around and how many stings have already happened that day. A couple of painful jellyfish reports might change your mind for you.

If you do decide to swim anyway, cover up. A neoprene wetsuit puts a physical barrier between your skin and jellyfish tentacles — useful, since some stings go well beyond a nasty itch. The Australian box jellyfish, for one, carries venom potent enough to be fatal to humans. Waterproof shoes can save you from stepping on a stingray in shallow water, which is where they like to rest. Shuffle your feet rather than stomping, and keep an eye on where you're walking and swimming.

Why does this matter for travellers? Because flag systems vary less than you might think, and a few seconds of reading the beach before you swim can save you a ruined holiday — or a trip to the hospital. Lifeguarded beaches in the US and many other countries follow the ILSF colours, so the same rules you learn at home will likely apply abroad. Make checking the flags part of your routine, along with swimming between the flags, going in the water with a buddy, and flagging down a lifeguard if you spot something odd. Jellyfish blooms and stingray season are natural, predictable events at many destinations — a purple flag just means today happens to be one of those days.