In optics, chromatic aberration (also called achromatism) is the failure of a lens to focus all colors to the same point. It occurs because lenses have a different refractive index for different wavelengths of light (the dispersion of the lens). The refractive index decreases with increasing wavelength.
Chromatic aberration manifests itself as "fringes" of color along boundaries that separate dark and bright parts of the image, because each color in the optical spectrum cannot be focused at a single common point on the optical axis.
Since the focal length f of a lens is dependent on the refractive index n, different wavelengths of light will be focused on different positions. Chromatic aberration can be both longitudinal, in that different wavelengths are focused at a different distance from the lens; and transverse or lateral, in that different wavelengths are focused at different positions in the focal plane (because the magnification of the lens also varies with wavelength).