Howdy, Stranger!

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

Supported by

changing text colour as a variable

Hi,
I am trying to set up an experiment on Opensesame and I have only had a little bit of practice. I have two variables: words and colours. I want the words to appear in three different colours. I have got the words to appear one after the other but don't know how to get them to appear in the different colours. I have been told to change the script but still not sure how and where to do this. Can someone give me some really clear instructions please.
Esther

Comments

  • Hi esther,

    What are you using to present your words? sketchpads or inline_scripts? If it is inline_scripts, you can simply use the color keyword: canvas.text('this is some text', color= 'green'). If you use sketchpads you can adjust the color in the script_view. I could try to explain it, but without seeing examples it is a little abstract. However, you can just look at the step-by-step tutorial. In step 6, they explain how you can generically set features of sketchpad items to vary across trials. So if use it as a template, you can generalize to your particular example.

    Let me know if you need more help.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.