Perovskite structure could be key to controlling its interaction with light