The colour in lanthanoid ions is due to the presence of unpaired electrons in partially filled 4f sub-shells.
Due to the absorption of radiations in the visible region there arises the excitations of the unpaired electrons from f-orbital of lower energy to the forbital of higher energy-giving f → f transitions.
The observed colour is complementary to the colour of the light absorbed.
The colour of try positive ions (M3+) depends upon the number of unpaired electrons in f-orbitals. Hence the lanthanoid ions having equal number of unpaired electrons have similar colour.
The colours of M3+ions of the first seven lanthanoids, La3+ to Eu3+ are similar to those of seven elements Lu to Tb3+ in the reverse order.