Skip to content

color

Experiments

Per-trial text-color control for specific screen elements (fixation cross, individual word stimuli, trial text, feedback text) or the whole page. The colors are applied when the trial is shown and cleared when it ends.

Put a single color in the cell, either a color name like blue or a hex code like #FF0000, to color all text on the page for that trial.

To color specific elements instead, list target:color pairs separated by ;, for example stim1:green;stim2:red;fixation:yellow. Write the pairs without spaces around : and ;. Colors must be names or hex codes; function syntax such as rgb(...) is not accepted.

Recognized target keys:

TargetElement affected
color (or single-value form)all page text
fixationthe fixation cross
stimN (e.g. stim1, stim2)word stimulus N; word stimuli only
trialTextthe trial text
feedbackthe feedback text on the trial’s feedback screen
anything elsesilently unused

If the column is absent or the cell is left empty, the trial falls back to its textColor cell. If that is also empty, no per-trial coloring happens at all.

At the end of the trial the colors are cleared: page text returns to the experiment’s overall text color, and element-specific colors are removed.

  • textColor: serves as the fallback source of the same syntax; a filled-in color cell wins over textColor.
  • Feedback: a whole-page color also colors the feedback text instead of the experiment’s default feedback color; a feedback:<color> target colors the feedback text too and takes precedence over the whole-page color.
  • stimN targets affect only word stimuli; image stimuli are not affected.
typestim1stimFormatcolor
testapplewordblue

Whole-page text (including the word) is blue for this trial.

typestim1stim2stimFormatfixationcolor
testleftrightword500stim1:green;stim2:red;fixation:yellow

Word 1 green, word 2 red, fixation cross yellow.

typestim1stimFormatfeedbackcolor
practiceappleword600feedback:#FF0000

Feedback text shown in red.

  • Only the first color or target list in the cell is read; anything after it is ignored.
  • Write pairs without spaces around : and ;; a pair with spaces around the separators is silently ignored.
  • Target keys are case sensitive: trialText must be camelCase exactly, and Fixation would be ignored.
  • Stimulus targets must be exactly stim followed by the number (stim1, stim2, …); any other key containing “stim” can break the trial.
  • Color values cannot contain parentheses or spaces, so rgb()/hsl() are not usable in this column.

color appears in these worked recipes:

  • Stroop colour naming: Show colour words in matching or clashing ink and score keyboard responses to the ink colour.