psychopy.org | 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:
image

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

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

image
image

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

You might need to start with a $

$[-1,-1,-1]

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.