textColor
Experiments
Sets the text color for a single trial. A plain color value recolors all of the trial’s text. When the color column is left empty, textColor also accepts that column’s per-element target:color syntax, so you can color the fixation cross or an individual stimulus from this column instead.
Syntax
Section titled “Syntax”Put a CSS color in the cell and the trial’s text is shown in that color: black, #FF0000 and rgb(0,0,0) all work.
To color individual elements instead, write a ;-separated list of target:color pairs, for example fixation:blue;stim1:green. See the color page for the list of targets. In this form only named colors and hex values are recognized.
Options
Section titled “Options”| Value | Effect |
|---|---|
| empty | Nothing; the project default stays |
CSS color (no ;) | Text color for this trial |
target:color;... list | Per-element colors, as in the color column |
Defaults & missing values
Section titled “Defaults & missing values”When the column is absent or the cell is left blank, the trial uses the text color set for the project, which is black unless you changed it.
A value applies to one trial only. Both the whole-trial color and any per-element colors are cleared when the trial ends, and the next trial starts again from the project default.
Works with
Section titled “Works with”colortakes precedence:textColoris only read for per-element colors whencoloris empty. A plain whole-trial color intextColorapplies either way.- Feedback screens restore the text color from the project’s setup value, and expect that value to be a hex color written without the leading
#. This concerns the project setting, not your cell, which is always used as written. - Form trials repaint their text with the project’s text color, so a per-trial
textColorhas no effect on form rows.
Examples
Section titled “Examples”| type | stim1 | stimFormat | textColor |
|---|---|---|---|
| test | apple | word | white |
type,stim1,stimFormat,textColor test,apple,word,white
White text (stimulus word and trial text) for this trial.
| type | stim1 | stimFormat | fixation | textColor |
|---|---|---|---|---|
| test | apple | word | 500 | fixation:red;stim1:#00FF00 |
type,stim1,stimFormat,fixation,textColor test,apple,word,500,fixation:red;stim1:#00FF00
With color absent, the multi-target textColor colors the fixation cross red
and the first word stimulus green, leaving the base text color at the default.
Tips & gotchas
Section titled “Tips & gotchas”- In the
target:colorform only the listed elements are recolored; the trial’s base text color stays at the project default. - Write the list without spaces.
fixation : redmatches no element,fixation:redworks. - Nothing checks the color for validity or contrast: an invalid single value simply does nothing.