Their secret is an unusual, U-shaped, W-shaped or dumbbell-shaped pupil that lets light enter the eye through the lens from a variety of directions, instead of straight into the retina.
The eyes of humans and other mammals have round pupils that can contract to pinholes, giving us clear, crisp vision, with all colors directed on the same place. But when pupils dilate, everything becomes blurry with colorful fringes around objects, a phenomenon known as chromatic aberration. That occurs because the lens of the eye behaves like a prism, splitting white light into component colors. As the area of the pupil through which light enters increases, the colors are further spread out. Thus, as the pupil (of a human) gets smaller, the chromatic aberration is reduced. Camera and telescope lenses also suffer from chromatic aberration, so photographers will reduce the amount of light entering (or stop down) their lenses to capture the sharpest image with the lowest amount of color blurring.
"We believe we have found an elegant mechanism that could allow these cephalopods to determine the color of their surroundings, despite having a single visual pigment in their retina," Stubbs continued. "This is an entirely different scheme than the multi-color visual pigments that are common in humans and many other animals. We hope this study will spur additional behavioral experiments by the cephalopod community."
Sources: AAAS/Eurekalert!, PNAS