Changing background color within an experiment

Hi Chris,

I would like to be able to change the background color/alpha during an experiment, presumably by manually changing color/alpha variables during an experiment.

If I were to go the route of using stimuli, e.g. blank fullscreen stimulus, I do want this to be on at all times across the multitask code, and therefore immune to any clear_stimulus_display() calls that exist. Would there be a way to do this?
If I do something like the following:

clear_stimulus_display()
live_queue_stimulus(blank_fullscreen)
update_stimulus_display()

Does both of the updates happen at once, i.e. there will be no frame in which blank fullscreen stimulus is not present?

Also, if you have a better suggestion that doesn’t require using a stimulus (e.g. somehow directly using stimulus_display background colors), please let me know. Thank you!

Hi Hokyung,

Does both of the updates happen at once, i.e. there will be no frame in which blank fullscreen stimulus is not present?

They don’t happen at once. There will be at least one frame where the blank screen stimulus is not present.

Also, if you have a better suggestion that doesn’t require using a stimulus (e.g. somehow directly using stimulus_display background colors), please let me know.

Using a stimulus is the only way. Although you can configure the default background color, it’s fixed when the experiment is loaded and can’t be changed later. Sorry!

Chris