Photograph someone against a bright window and zoom in: a thin violet border traces the boundary between dark hair and blown-out sky. It hugs the cruelest contrast in the frame, follows no outline you can see with your eye, and survives every tap of the exposure slider. Purple fringing has frustrated photographers for as long as digital cameras have existed, and the interesting truth is that it is usually two separate failures happening on the same pixels — one owned by the lens, one by the sensor — and both of them drift toward the same corner of the color wheel.
The lens cannot focus every color at once
Glass bends light by an amount that depends on wavelength — blue bends slightly more than red on its way through every element. A lens is a committee of curved surfaces trying to bring all wavelengths to the same focus, and it never fully succeeds. Even a good lens leaves the colors landing marginally apart: focused at slightly different depths, and projected at slightly different heights on the sensor toward the frame's edges. Optical engineers call this chromatic aberration, and lens designers have fought it for two centuries with special glasses and elements that cancel each other's dispersion — the same unforgiving physics that lets a sensor misjudge a violet petal punishes every boundary in a backlit frame.
Wherever the scene jumps from very dark to very bright, that misalignment stops being invisible. The dark side of the boundary is missing a sliver of blue image; the bright side is missing a sliver of red. The lens has effectively drawn two slightly offset photographs, and along the seam your eye sees the mismatch — most visibly as a fringe that strengthens toward the edges of the frame, at wide apertures, and on zoom lenses at their extremes.
Half of your pixels are guesses
The second failure begins where the first one lands. Nearly every color sensor hides its three sets of color filters behind a mosaic — the familiar Bayer pattern in which each pixel measures only red, green, or blue, arranged in rows like a checkerboard. The full-color image your phone displays does not exist until software reconstructs it, inferring each pixel's two missing colors from its neighbors. That reconstruction, demosaicing, is a marvel on smooth gradients and a liability at knife-edge contrast.
A hard silhouette edge is exactly where inference fails. The algorithm sampling across the hairline mixes values from both sides, and the errors land unevenly in the three channels. Combine that with a physical quirk of small sensors — charge leaking sideways out of overfilled bright pixels, spilling into their darker neighbors — and the reconstructed seam acquires a violet cast: too much blue where blue was never measured cleanly, mixed with red bleeding in from the glare. The signal-processing literature treats demosaicing as one of the defining problems of single-sensor color cameras precisely because errors at edges are unavoidable, only minimized.
Why the fringe picks violet
Neither failure sets out to make purple. The lens contributes opposite-color fringes — one side of the boundary leaning blue, the other red. The sensor contributes channel reconstruction errors strongest on diagonals, where the mosaic samples most awkwardly. Stack the two, and the middle of the seam shows red and blue errors overlapping with the green channel squeezed thin between them, which the eye reads as magenta-to-violet. That is also why the same artifact crops up in the purple ghosts of night photos, which share the lens's tendency to misplace short-wavelength light.
Because two mechanisms are involved, a little detective work can tell you which one owns a given fringe. Look at where it sits in the frame: errors that grow toward the corners and line up with the frame's radial directions belong mostly to the lens, whose color misregistration scales with distance from the optical center. A thin violet outline that hugs the subject equally everywhere — center included, and often worst on fine diagonal detail like branches and eyelashes — leans toward the sensor's reconstruction. Photographers who care about the distinction shoot a test chart of angled black wedges on white; the two error patterns separate cleanly, and each calls for a different correction.
What reduces it
Nothing removes the physics, but several things crowd it toward invisible. Stopping the lens down a stop or two shrinks the aperture's dispersion footprint and usually thins the fringe noticeably. Reframing so the hardest dark-bright boundary is not at the frame's edge moves it away from where lateral aberration is worst. Modern software helps more than people expect: correction profiles built for specific lenses know each one's color error as a function of position and stretch the channels back into register, and editors can defringe specific hue ranges without touching the rest of the photo.
What does not work is blaming the sensor's resolution. A higher-megapixel sensor guesses at smaller seams, but the lens that caused the misalignment does not improve for free. A modest photo taken with the sun behind your subject and the camera thoughtfully angled will beat a heroic one taken straight into the glare — and if you enjoy hunting small color errors, the Pink or Purple? game shows how narrow the territory between those two names really is.