Many are familiar with this popular illusion where a single shade of color appears to be two different shades, depending on what color surrounds it
The orange dots in the image are actually the same color, even though they appear to be clearly different. A detailed explanation can be found here.
Since the perception of a color is affected by what colors it is next to, I wonder, is there information out there for how to correct for this phenomenon?
What I mean is that, suppose I see a color out "in the wild", such as on a color swatch or on someone's web page. I found out what color it is-- say, Coral Pink, #F88379. Then I decide I want to use it in a color scheme. But, because of color constancy, when I place it next to my other colors, it would appear to be slightly different than it would in other contexts.
Has anyone mathematically determined how to correct for this effect? Is there a program I can use to help me do so?