 Many amphibians are nocturnal and hide during the day , thereby avoiding diurnal predators that hunt by sight . Other amphibians use camouflage to avoid being detected . They have various colourings such as mottled browns , greys and olives to blend into the background . Some salamanders adopt defensive poses when faced by a potential predator such as the North American northern short @-@ tailed shrew ( Blarina brevicauda ) . Their bodies writhe and they raise and lash their tails which makes it difficult for the predator to avoid contact with their poison @-@ producing granular glands . A few salamanders will <unk> their tails when attacked , sacrificing this part of their anatomy to enable them to escape . The tail may have a constriction at its base to allow it to be easily detached . The tail is regenerated later , but the energy cost to the animal of replacing it is significant . 
