In the figure given below a narrow beam of white light is shown to pass through a triangular glass prism. After passing through the prism, it produces a spectrum XY on a screen.
(i) State the colour seen at X and Y.
(ii) Why do different colours of white light bend through different angles with respect to the incident beam of light?