Holy crap, these photos are sweet. I can't give enough thanks to urjsa for sharing these and awakening us to the colorful world of beetles, and to Mike Ruggirello for inspiring this post with his photo capturing the delicate iridescence of a beetle.
With beetles being the group of insects with the largest number of known species, its not surprising that a wide range of color would exist across the different species, but the palettes and patterns displayed on these animals are astounding...
Beetles and their larvae have a variety of strategies to avoid being attacked by predators or parasitoids. These include camouflage, mimicry, toxicity, and active defense.
Camouflage involves the use of colouration or shape to blend into the surrounding environment. This sort of protective coloration is common and widespread among beetle families, especially those that feed on wood or vegetation, such as many of the leaf beetles (family Chrysomelidae) or weevils. In some of these species, sculpturing or various coloured scales or hairs cause the beetle to resemble bird dung or other inedible objects. Many of those that live in sandy environments blend in with the coloration of the substrate.
Another defence that often uses colour or shape to deceive potential enemies is mimicry. A number of longhorn beetles (family Cerambycidae) bear a striking resemblance to wasps, which helps them avoid predation even though the beetles are in fact harmless. This defence can be found to a lesser extent in other beetle families, such as the scarab beetles. Beetles may combine their colour mimicry with behavioural mimicry, acting like the wasps they already closely resemble. Many beetle species, including ladybirds, blister beetles, and lycid beetles can secrete distasteful or toxic substances to make them unpalatable or even poisonous. These same species often exhibit aposematism, where bright or contrasting colour patterns warn away potential predators, and there are, not surprisingly, a great many beetles and other insects that mimic these chemically-protected species.
Text from wikipedia