Chromostereopsis
In addition, there is lightness illusion in the uniform blue background, which is grating induction.1)
For many people, the red is located on the top of the illusory bulges. For more than half observers, the red heart appears to float in front of the blue surround (upper panel) while the blue heart appears to sink behind the red surround (lower panel). Those who see the red heart in front of the blue surround when the background is black (“Floating heart”), tend to see the red BEHIND the blue when the background is white.
Source: www.ritsumei.ac.jp