The back of your eye is lined with light-sensitive cells, including color-sensitive cone cells. Your cones affect each other in complex ways. These connections give you good color vision, but they can also fool your eye.
When cones in one part of your eye see blue light, they make nearby cones less sensitive to blue. Because of this, you see a colored spot on a blue background as less blue than it really is. If you put a purple spot on a blue background, for instance, the spot looks a little less blue than it otherwise would. Similarly, a red spot on an orange background looks less orange than it otherwise would.