The more electrons are confined, the closer the spacings between their energy levels and so the bluer the colors they absorb. Different ions obviously confine their electrons differently, and so have different colors. ….…..
….….….…
….….….….…...
….….….….….…..