Howdy, Stranger!

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

Supported by

Changing background color of a canvas by referring to a variable

Hi Everyone,

I am building an experiment in which I am trying to change the colour of canvas background by referring to a variable 'color' that I created so my canvas can have different colors (yellow and blue in this case) in each trial. This is the function that I use to refer to the variable:

cv = canvas(background_color='var.color')

However, this does not work and I always get en error. Does someone maybe know how to correct this and write the code so that the canvas color can be determined by the variable I created?

Thank you very much for your help!

Comments

Sign In or Register to comment.