The ability of a chameleon to change its colour is an adaptive feature for