Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Changing background colour


I've created an experiment in which I present some photo stimuli and record some keyboard responses. However, for a specific set of stimuli I want them to be presented on black background and the other set on white background. The entire experiment in on white background so I only need to change one of them. I am using one sketchpad for each set (and the image title is based on a variable which is randomly assigned earlier on during the loop).

I've tried to include both of these scripts right before the sketchpad (in an inline script) and it doesn't work.

win.setColor('red') # Set window color
win.flip() # Update window

----- OR -------

exp.set('foreground', 'yellow')
exp.set('background', 'blue')

Anyone has any ideas how to solve this? Many thanks in advance.



  • I´m not an expert on coding. So, I think you can use the "draw rect element" on the sketchpad to fill the background, above it put your image.

    I hope that was helpful.

    Thanked by 1Stef
  • Just tried that and it works. Thank you!

Sign In or Register to comment.