In recent years there have been a lot of studies confirming that the perceived flavor of coffee can be substantially influenced by seemingly unrelated stimulus on other senses. At this point it's a well known parlor trick with many variations that reliably work. This effect is not unique to coffee and sensory scientists have known about this for a long time. This is why certain kinds of tests are often done under red lights. One of these tests is triangulation cupping. This can be done with coffees that are known to be different as a way of evaluating how well a person can distinguish different coffees, but its more interesting use is in prodution quality control.
The way a triangulation cupping works is you have two cups of one coffee and one cup of another coffee. The different cup is positioned at random. Often these are two separate roasts of the same coffee intended to be sold as the same product and ideally you can't determine a difference. That's how you know you're producing your intended product consistently. In the event that you do perceive a difference, it's also a good idea to judge how different the odd cup out is so you can decide if that's still something that you can sell as its intended product or if it would be better to find a different use for the out of spec batch. If a differenece is perceived, you can also double check that it's identified on the cup that was different. If you're picking the wrong cup that might indicate an inconsistency in your cupping practices which can be helpful in setting your tolerance for differences among cups or for identifying procedural issues that can be corrected.
Performing this test under red light makes it impossible to see differences in the color of the coffee grounds. Without that, minor visual differences can predispose a person to perceive much larger differences in flavor than exist in the absense of those visual clues. It isn't a complete elimination of visual stimulus and certain ways a finished product can be out of spec can impact the persistence of the grounds crust that forms during cupping, but that's still an improvement over cupping under more natural lighting conditions. This isn't to say that you should ignore differences in color, just that color is a different test that should be performed separately from flavor matching tests.
At the first Roasters Guild Sensory Summit, there was a session on this sort of taste testing for production quality control. With such a large group in attendance and the need to be able to use the space for other things, switching to red lights during the cupping exercises would not have been practical. The same challenge exists for many companies that simply don't have the dedicated space to have a second set of lights to perform this sort of test under. The way this was solved at Sensory Summit was to give everybody a pair of cheap red tinted glasses. You can see the glases I took home from that event in the video. This makes a lot of sense as it really doesn't matter if the red filter is placed in front of the light source or if it's placed in front of your eyes. The effect is exactly the same.