Hi everyone,
I am creating an experiment where I will show participants 6 different colored squares and in the test trial only one square should change color and participants will choose the square they think that changed color. For that I will use safe colors for colorblind participants. (PsychoPy Colours - Google Sheets) However, when trying to assign these colors I am getting this error:
Since the error indicates that Psychopy knows you are trying to define a color, I am guessing you are using some command like stim.setColor() later in your code. I am guessing this is what is generating the error, rather than the page pictured above. In the above code, you are just defining blue_bright as a sequence of numbers, but it’s not identified as a color.
Now, if you look at some of the examples from the help page, you see some possible ways of defining a color. I’ll focus on these two:
stim.setColor('Firebrick') #one of the web/X11 color names
stim.setColor([1,1,1], colorSpace='rgb') #all guns to max
It seems to me that you are trying to create custom colors and then reference them later. However, to do that you would need to use the variableblue_bright (which will just stick your three custom numbers into the first argument) and not the text 'blue_bright' which would try to find a web/X11 color called ‘blue_bright’.
Maybe I’m way off base, but in any case it will be helpful to check how the variable is being called later and post this info for further troubleshooting.