Staring at a color fatigues that hue's cone response; looking away, the eye briefly reports the opponent color. This approximates that afterimage as the RGB inverse of your selection — hue rotated 180°, lightness mirrored.
Past roughly 15–60 Hz (the exact point depends on contrast and the viewer), alternating colors stop reading as two colors and fuse into one blended hue by temporal summation — the Talbot–Plateau law, the same effect behind a spinning color top. This panel measured your display at ~60 Hz and holds each color for a whole number of frames, so the rate only lands on clean divisions of that — 60, 30, 20, 15, 12 Hz and so on — instead of drifting between uneven frame counts. Note: large-area flicker can trigger seizures in people with photosensitive epilepsy; WCAG 2.3.1 sets the general caution line at 3 Hz.