A robot that can change colour to either blend in with or stand out from its surroundings is created by scientists.