Why are complex ions containing transition elements coloured?

A Level