# Gray Background

**URL:** <https://mworks.discourse.group/t/gray-background/640>\
**Category:** Support\
**Created:** [January 30, 2012, 2:10pm UTC](https://mworks.discourse.group/t/gray-background/640 "2012-01-30T14:10:23Z")\
**Posts on this page:** 4\
**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:** [January 30, 2012, 2:10pm UTC](https://mworks.discourse.group/t/gray-background/640/1 "2012-01-30T14:10:23Z")

</div>

Hi Chris,  
Kindly help me through this.  
As you know, there is a gray background appearing on the screen before Mwork experiment is started and after the experiment is stoped. I wonder how I can change this background to black.

Bests,  
S

---

<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:** [January 30, 2012, 4:21pm UTC](https://mworks.discourse.group/t/gray-background/640/2 "2012-01-30T16:21:28Z")

</div>

Hi Sina,

At present, there’s no way to change the background color when the experiment isn’t running. (The current value of 50% gray is hard-coded in the MWorks source.) It probably should be a setting in `setup_variables.xml`. I’ll open a ticket for that change.

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:** [October 3, 2012, 7:54pm UTC](https://mworks.discourse.group/t/gray-background/640/3 "2012-10-03T19:54:06Z")

</div>

Hi Sina,

It’s now possible to change the default background color in an MWorks experiment. To do so, just add an I/O device of type `stimulus_display` to your experiment, and set its `background_color` parameter to the color you want (using the same syntax as the `color` parameter of a `blank_screen` stimulus).

MWEditor now includes a stimulus display device in new experiments. You can add one to an existing experiment by selecting “Stimulus Display” from the “Input/Output” section in the library window. Alternatively, if you edit your experiment file by hand, you can add the following XML to the `io_devices` section (replacing `0,0,0` with the color you want):

```
<iodevice type="stimulus_display" tag="Stimulus Display" background_color="0, 0, 0"/>

```

If an experiment does _not_ include a stimulus display device, then the old default background color (50% gray) is used.

This change will be in tonight’s nightly build and the upcoming 0.5 release. If you have any questions, please let me know.

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:** [July 19, 2022, 11:33pm UTC](https://mworks.discourse.group/t/gray-background/640/4 "2022-07-19T23:33:10Z")

</div>

Closed on July 19, 2022, 11:33pm UTC


