Step 1: Understand the dispersion of light.
When white light passes through a prism, it undergoes dispersion, separating into its constituent colours. These colours have different wavelengths and therefore different refractive indices in the material of the prism.
Step 2: Relationship between wavelength and deviation.
The amount of deviation of light depends on its wavelength. Light with shorter wavelengths (like violet) deviates more than light with longer wavelengths (like red).
Step 3: Conclusion.
Therefore, the colour with the maximum deviation is violet. The correct answer is (D).