background
Experiments
Displays a full-screen background image behind the stimuli for one trial. Typical use: a scene or board image over which word/image stimuli are shown or dragged.
Syntax
Section titled “Syntax”Put an image filename with its extension in the cell, e.g. board.png. The file is loaded from the project’s stimuli. Only a filename is supported, and only the first filename-like part of the cell is used: letters, digits, underscores, commas, spaces, and hyphens, followed by a dot and a 1-4 letter extension.
Options
Section titled “Options”| Value | Effect |
|---|---|
| empty cell | No background |
<name>.<ext>, e.g. forest.jpg | Shown centered, not repeated, behind the whole page while the stimuli are on screen |
CSS values (linear-gradient(...), url(...) repeat, colors) | NOT supported. Only a filename-like part is extracted; from url('pattern.png') repeat only pattern.png would be used; a gradient with no dotted token matches nothing |
Defaults & missing values
Section titled “Defaults & missing values”When the column is absent or the cell is left empty, no background image is shown. A background image lasts exactly one trial: at the start of every trial the page is repainted with the project’s background color, which clears the previous trial’s image.
Works with
Section titled “Works with”- Shown only on stimulus trials (images, words, audio, video); instruction and form trials never show a background image.
- Preloading: background images are preloaded before the experiment starts.
- Screen calibration: when calibration is active, the background image is scaled to match the calibrated screen size.
- Drag responses: with draggable stimuli, the drag limits default to the background image’s bounds, so the background defines the playing field.
bgColor: the two combine. ThebgColorcolor fills the page and the background image is painted on top of it.
Examples
Section titled “Examples”| type | stim1 | stimFormat | background | responseType |
|---|---|---|---|---|
| test | token | .png | board.jpg | drag |
type,stim1,stimFormat,background,responseType test,token,.png,board.jpg,drag
board.jpg is shown centered behind the draggable stimulus, and drags are
limited to the board’s area.
| type | stim1 | stimFormat | background |
|---|---|---|---|
| test | apple | word |
type,stim1,stimFormat,background test,apple,word,
No background image.
Tips & gotchas
Section titled “Tips & gotchas”- Only the first filename-like part of the cell is used; everything else in the cell is ignored.
- An updated stimulus file is picked up on the next run, never a cached older copy.
- Outside screen calibration, the image displays at its natural size; there is no column syntax to resize it.
Common combinations
Section titled “Common combinations”background appears in these worked recipes:
- Drag to respond: Let participants drag stimuli into position over a scene and record where each one lands.