Understanding the functions of animal coloration has been a long-standing question in evolutionary biology. For example, the widespread occurrence of striking longitudinal stripes and colourful tails in lizards begs for an explanation. Experiments have suggested that colourful tails can deflect attacks towards the tail (the 'deflection' hypothesis), which is sacrificable in most lizards, thereby increasing the chance of escape. Studies also suggest that in moving lizards, longitudinal body stripes can redirect predators' strikes towards the tail through the 'motion dazzle' effect. Despite these experimental studies, the ecological factors associated with the evolution of such striking colorations remain unexplored. Here, we investigated whether predictions from motion dazzle and attack deflection could explain the widespread occurrence of these striking marks using comparative methods and information on eco-physiological variables (caudal autotomy, diel activity, microhabitat and body temperature) potentially linked to their functioning. We found both longitudinal stripes and colourful tails are associated with diurnal activity and with the ability to lose the tail. Compared to stripeless species, striped species are more likely to be ground-dwelling and have higher body temperature, emphasizing the connection of stripes to mobility and rapid escape strategy. Colourful tails and stripes have evolved multiple times in a correlated fashion, suggesting that their functions may be linked. Overall, our results together with previous experimental studies support the notion that stripes and colourful tails in lizards may have protective functions based on deflective and motion dazzle effects.