Most colour patterns in animals represent an elegant compromise between conspicuousness to ensure effective communication with preferred receivers and camouflage to avoid attracting the attention of unwanted predators. Many species, including several coral reef fishes, overcome this conflict by using ultraviolet (UV) colouration and signalling, as these colours are visible only over short distances and are often invisible to their predators. Despite a great interest in their behavioural significance and ecological influence on survival, little is known about when these colours first develop on the bodies of free-living animals. Here we show for the first time that the UV facial patterns of a coral reef fish do not develop in captivity but only when juveniles experience the socio-behavioural conditions of their natural environment. Using field and laboratory experiments, we determined that the onset and early development of these UV facial markings did not occur at metamorphosis. Instead, juveniles developed the UV markings during their first two weeks on the reef. Exposure to different reef environments revealed significant plasticity in the development of these markings. The direct or indirect (through intraspecific interactions) exposure to predators is a likely candidate trigger for the plastic development of these UV markings in the wild.