A color code separates the two views

An anaglyph image is made by combining two pictures taken—or rendered—from slightly different horizontal viewpoints. That small shift imitates the difference between what the left and right eyes see when they look at a nearby object. In the finished image, the two views sit on top of each other, often with colored edges that look doubled without the glasses.

The glasses act as simple color gates. In a common version, the red lens passes mostly red light and blocks much of the cyan, while the cyan lens does the reverse. The image is prepared with matching color channels, so each eye receives mainly the view intended for it. The filters do not create depth; they keep the two depth clues from blending together before the brain can use them.

The brain reads the difference between the views

The brain routinely compares the images from both eyes. When a feature appears in slightly different horizontal positions, that difference—called binocular disparity—helps the brain estimate how near or far it is. The image maker controls the apparent depth by changing the spacing between corresponding features: greater separation can suggest greater depth, while the direction of the offset affects whether something seems to sit in front of or behind the screen.

This is why the effect depends on wearing the glasses and looking at the image from a suitable position. Without the filters, both views reach each eye and the colored outlines remain visible; with them, the brain can fuse the views into a spatial scene.

The tradeoff is color

Because the lenses separate the picture by color, they cannot deliver the full original palette to both eyes. Reds and cyans may look muted or uneven, and some colors can leak through the filters, weakening the separation. Anaglyphs are a low-tech way to add a depth cue to an ordinary printed page or screen, but they do it by spending some color fidelity.