The guide
An anaglyph is two pictures sharing one sheet, and color pays the rent
Two tinted filters hand each eye its own view, and the brain builds depth from the difference. Every gain in depth is paid for in color, comfort or alignment.
- August 1853 oldest known description of an anaglyph, by W. Rollmann
- 0.299, 0.587, 0.114 luma weights behind the gray and half-color methods
- about 3 percent parallax range of pictures judged comfortable in television tests
- 0.7 percent vertical offset, as a share of height, where viewers began to notice
- 3 inches how far to slide one camera between the two shots
Read the full guide Fold the guide
Hold a finger in front of your face and close one eye, then the other. The finger jumps sideways against the wall behind it. That jump is parallax, and the brain reads it constantly: the larger the jump, the nearer the thing. A flat picture has no parallax at all, which is why a photograph of a canyon never quite feels deep.
Stereo pictures cheat by showing each eye a slightly different photograph. The stereoscope, which Charles Wheatstone invented in 1838, did it with two prints side by side and a viewer that kept each eye on its own print.
It worked, and it had one stubborn limit that no lens could fix. Only one person could look at a time, and only through a box.
The anaglyph removes the box. Both views are laid on top of each other in two different colors, and a pair of tinted filters sorts them out again at the eyes. The price is color itself, because the thing doing the sorting is the very property a photograph uses to look natural. Everything that follows is a way of deciding how much color to spend.
Three people and one pair of spectacles
The oldest known description dates from August 1853, when W. Rollmann wrote up what he called a color stereoscope: line drawings in two colors viewed through red and blue glasses. He was already tuning it. He reported that yellow lines read more distinctly than red ones through the blue glass, the first recorded complaint about a color that one eye cannot see well.
Five years later, in 1858, the French physics professor Joseph d’Almeida turned the idea into a show. Two lantern slides, one lit through red glass and one through green, were projected on top of each other for an audience wearing goggles in the same two colors. Each eye saw only the slide meant for it, and a room full of people saw the same relief at once.
Louis Ducos du Hauron took the lantern away. His French patent of 1891, repeated in the United States in 1895, describes two drawings or photographs printed over each other on white paper in complementary inks. He kept, in his own words, only the spectacles. He also noticed the reversal that still catches people today. On a screen, an eye sees the picture whose color matches its filter. On paper, a red filter turns the red ink invisible against the white sheet and shows the other ink as dark lines, so each filter must be matched to the opposite ink.
He listed workable pairs, red with green, orange with blue, yellow with blue-violet, and he described the effect of a deep landscape in a phrase that has never been bettered: the paper seems to vanish and the eye looks out as if through a window. He added a warning too. Put the glasses on the wrong way round and what should recede comes forward, and solid things turn hollow.
Why a red apple is the hardest thing in the picture
On a screen the usual pair is red for the left eye and cyan for the right. The simplest recipe, usually called the color anaglyph, takes the red channel from the left photograph and the green and blue channels from the right one. Gray and neutral things survive this well. A saturated red object does not: it is bright in the left eye and nearly black in the right. The brain is offered two pictures that disagree about brightness, cannot merge them, and flickers between the two. That is retinal rivalry, and it is tiring to look at.
The gentler recipes all attack rivalry by giving up some color. The gray method reduces both photographs to brightness first, using the television luma weights 0.299, 0.587, 0.114 for red, green and blue, and then tints them. Nothing fights, and nothing has any color. The half-color method grays only the left view and keeps the right view’s green and blue. A variant often labeled optimized goes further and builds the red channel from the left view’s green and blue alone, seven parts to three, so that a red apple can no longer be brilliant in one eye only. Reds turn brownish. That is the trade, stated honestly.
Each of these is just a pair of small tables: three numbers saying how much of the left photograph’s red, green and blue goes into each output channel, and three more for the right photograph. Written that way, the methods stop being recipes and become points in one space, and a natural question appears. Is there a best point?
What least squares is being asked to do
In 2001 Eric Dubois published an answer that many anaglyph programs have since adopted. Describe what each eye actually receives through its filter. Describe what each eye would have received from the original left and right photographs. Then choose the output color whose two filtered versions are, taken together, as close as possible to the two originals. Closeness is measured as a sum of squared differences, which is what least squares means, so the solution is a projection and comes out, again, as two tables of nine numbers.
The published red-and-cyan tables look odd at first. The red channel takes about 0.46, 0.50 and 0.18 of the left view’s red, green and blue, which is close to a brightness, not a red. Several entries are small negative numbers, which subtract a little of one view from the channels meant for the other. The method is credited with keeping much of the color while reducing both ghosting and rivalry. One freely licensed video tool prints these tables in its source code for red and cyan, green and magenta, and yellow and blue glasses, and makes the red and cyan one its default.
The method has a quiet requirement. Filters act on light, and the numbers stored in a picture file are not proportional to light. The sRGB standard encodes them through a curve, roughly a power of 2.4 with a short straight toe, so honest light arithmetic means decoding, computing and encoding again. The tool on this page derives its own least-squares tables that way, measuring closeness in the CIE XYZ space, from a deliberately crude filter model: each filter passes its own display colors fully and a stated few percent of the others.
That model is an assumption, not a measurement of anyone’s glasses. It is shown beside the result, and the leak can be changed.
Parallax, the window and what comfort costs
Color decides whether the two views stay apart. Geometry decides where things appear. A point that lands in the same place in both views sits on the screen surface. If its right-eye image lies to the right of its left-eye image it appears behind the screen, and if the images cross it floats in front. Sliding one whole view sideways therefore moves the entire scene nearer or farther, and choosing what sits exactly on the screen is the main creative decision in finishing a stereo picture.
The frame of the picture behaves like du Hauron’s window. Objects can lean a little through it toward you, but anything in front that is cut off by the left or right edge looks wrong, because a real window cannot hide something that is nearer than itself. The usual fix is to push the scene back until the nearest edge object is on the screen, then trim away the strips that only one view covers.
How much depth is too much? A broadcasting report from the International Telecommunication Union summarizes viewing tests on high definition television in which every picture rated comfortable had a parallax range of roughly 60 pixels or less on a screen 1920 pixels wide. That is about 3 percent of the width. The same report is careful to say that regulating parallax alone is not reasonable, because what a viewer perceives also depends on the display, the glasses, the viewing conditions and the viewer. Treat the figure as a guide for a first try.
The same report lists how little misalignment people detect. A vertical offset between the views became noticeable at 0.7 percent of the picture height, a rotation of one view at half a degree, and a size difference at 1.2 percent. Sideways offset is the signal; every other difference between the two views is an error to remove before judging depth. The report also passes on a plain piece of advice from the research it cites: stop when the two views become hard to merge.
A worked example makes the numbers concrete. The still life that opens this page is rendered with a known rule: a point at depth Z has a disparity of 117 divided by Z pixels, in a picture 900 pixels wide. The back wall at depth 12 is offset by 9.75 pixels and the front of the red ball at depth 5 by 23.4. Shifting the right view 23 pixels puts the ball’s front on the screen and leaves the wall 13.25 pixels behind, which is 1.47 percent of the width. The measured readout says 1.50.
One camera, two steps, and the limits
A stereo pair does not need a special camera. Take a photograph, slide the camera sideways about 3 inches, roughly the distance between the eyes, and take the same photograph again. Nothing in the scene may move in between, which rules out wind, traffic and restless people. NASA’s instructions for this method name the commonest mistake: taking the two pictures too far apart. Keep the camera level as it slides, since a tilt of half a degree is already visible.
What an anaglyph cannot do is worth saying plainly. It cannot show faithful color, least of all saturated red, and no table of numbers repairs that. It cannot remove ghosting, the faint double edge where a filter lets the wrong view through; that depends on the glasses and the screen, and any estimate made without measuring them is only a model. Printed anaglyphs add ink behavior on top, so a print needs checking through the glasses.
Making the second view from one photograph and a depth map is weaker still. Pixels are slid sideways by their depth, and wherever a near object moves aside, the picture holds nothing for the strip it uncovered. That strip has to be invented from the background next to it. The result can be pleasing. It is a synthesized view, not a record of what a second lens would have seen.
One popular alternative is left out here on purpose. A wiggle picture swaps the two views several times a second so that depth shows without glasses. Web accessibility guidance limits content to three flashes in any one second because flashing content can cause seizures in some people, and a full-frame swap between two differing photographs can cross that line. A still anaglyph, saved without loss in a format such as PNG, asks only for a pair of paper glasses.
Sources
Every source consulted for this guide. Links checked October 7, 2026.
- What on Earth is an Anaglyph? NASA Science
- Make Your Own 3D Images NASA Science
- Stereoscopic Print, U.S. Patent 544,666 United States Patent and Trademark Office
- Anaglyph 3D Wikipedia
- FFmpeg Filters Documentation FFmpeg project
- FFmpeg/libavfilter/vf_stereo3d.c FFmpeg project, source code under the GNU General Public License
- anaglyph.py: 3D Anaglyph image generator Miguel Grinberg, source code under the MIT License
- BT.601: Studio encoding parameters of digital television for standard 4:3 and wide screen 16:9 aspect ratios International Telecommunication Union
- Report ITU-R BT.2160-2: Features of three-dimensional television video systems for broadcasting International Telecommunication Union
- CSS Color Module Level 4 World Wide Web Consortium
- IEC 61966-2-1:1999 International Electrotechnical Commission
- Understanding Success Criterion 2.3.1: Three Flashes or Below Threshold World Wide Web Consortium, Web Accessibility Initiative
- Portable Network Graphics (PNG) Specification (Third Edition) World Wide Web Consortium