Fixation point color assignment

Hi Chris,

I am trying to change the fixation_point color property by trial based on some contingencies.

I can change sth like position alright, but have trouble with the color.

I tried assigning it a variable, and formatting the variable either as a list or as a string

Var fix_col=1,0,0
Var fix_col=’1,0,0’

And then assign this in the color property of fixation_point. If I hardcode those values there, it’s not a problem. If I try to assign, it gives the following error

reason: Color string must have three comma-separated components

I hope this is trivial for you to tell me how to fix?



Hi Alina,

You need to define the color in terms of three variables, one for each component:

var fix_col_r = 1
var fix_col_g = 0
var fix_col_b = 0

Then, use those variables in your stimulus definition:

color = fix_col_r, fix_col_g, fix_col_b


I believe the correct response in English to this is ‘duh’ ^^

I don’t think the answer was obvious. We really should accept three-element lists as color values, since that would be more convenient than defining three variables in some situations. I’ll add that to my to-do list.


Yeah that’s true, because I have several fixation point objects it is kind of tedious already. Would be nice to fix. Still I could have thought about this solution!