Opposite colors for my stimuli

Firstly:

We can’t easily cut and paste your code if it isn’t formatted as code (e.g. straight quotes become curly quotes).

Secondly:
I’m not really sure what the issue is here. Perhaps things will be clearer if you change the spatial frequency to be 0.03 rather than 3: