Relative color

I’m amazed at how many people think that colors are absolute, meaning the same RGB value will be perceived as the same color in every condition. It’s definitely not like that. Lighting conditions and the proximity of other colors and shapes greatly affect our perception, and our brain performs an enormous amount of corrections.

Consider this optical illusion:

Despite squares A and B are the exact same color, they are perceived as black or white in the proximity of other colors. In Color Theory, this is called “color context”.

Lighting conditions are another source of relativity. When using our eyes, our brain learned what lighting conditions we’re on and automatically adjust perceived colors. Digital Cameras have a tough time understanding what our brain is automatically correcting. That’s why we’re asked to adjust white balance when taking pictures. The following pictures show the same object in the assumption of three different lighting conditions (tungsten, fluorescent, and sun):

Why is this relevant to an e-commerce company like MercadoLibre? Because we need to extract product colors from user-uploaded pictures with unknown lighting conditions and therefore, unknown colors. This is a non-deterministic, complex, and beautiful problem to deal with. We’ll keep you posted.

Daniel Rabinovich