| Reference | Downloads | Github

Background Color Bug

Hi all,

There seems to be a bug when compiling my experiment to run (both python or javascript). The code requires that the color parameter of visual.Window() to be entered as a list of floats, but by default it seems to be a string:

You can change it manually by going into the editor, but maybe this can be fixed in a later version?:

OS (e.g. Win10): Windows 10
PsychoPy version (e.g. 1.84.x): v2021.2.3
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?: change background color of experiment


What happens if you put square brackets round your list of floats?

You might need to start with a $


This is a known bug which will be fixed in the next release:

but you can also get around it by adding a $ in front of the value to force it to be treated as code rather than a string

Appreciate the responses. Yes, using something like $[-1,-1,-1] in the builder is a much better solution than what I was doing.