# Fixation point color assignment

**URL:** <https://mworks.discourse.group/t/fixation-point-color-assignment/71>\
**Category:** Support\
**Created:** [April 4, 2022, 2:01pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71 "2022-04-04T14:01:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 4, 2022, 2:01pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/1 "2022-04-04T14:01:32Z")

</div>

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?

Thanks

Alina

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 4, 2022, 2:04pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/2 "2022-04-04T14:04:54Z")

</div>

Hi Alina,

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

```auto
var fix_col_r = 1
var fix_col_g = 0
var fix_col_b = 0

```

Then, use those variables in your stimulus definition:

```auto
color = fix_col_r, fix_col_g, fix_col_b

```

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 4, 2022, 2:22pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/3 "2022-04-04T14:22:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 4, 2022, 2:28pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/4 "2022-04-04T14:28:18Z")

</div>

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.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [April 4, 2022, 2:31pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/5 "2022-04-04T14:31:33Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 6:06pm UTC](https://mworks.discourse.group/t/fixation-point-color-assignment/71/6 "2022-07-19T18:06:49Z")

</div>


