Skip to content

Stroop colour naming

Show colour words in matching or clashing ink and score keyboard responses to the ink colour.

Use this for the classic interference paradigm: the participant names the ink colour while the word itself pulls towards reading. The word has to be plain text coloured at display time, because pre-rendering every word-ink pairing as images multiplies your stimulus files and makes the congruent and incongruent sets drift apart. Pick a picture-word or flanker design instead when the interfering dimension is not the colour of the text itself.

condition1condition2typestimFormatstim1colorkeyboardkey
congruentredtestwordREDstim1:redr g br
congruentgreentestwordGREENstim1:greenr g bg
congruentbluetestwordBLUEstim1:bluer g bb
incongruentredtestwordGREENstim1:redr g br
incongruentgreentestwordBLUEstim1:greenr g bg
incongruentbluetestwordREDstim1:bluer g bb

stim1 holds the word as text (stimFormat word), and color sets its ink with the targeted form stim1:red rather than a bare colour, which would tint all page text for the trial. Three details of that cell matter: write the pair without spaces around the colon, keep the target key exactly stim1 (targets are case-sensitive and only affect word stimuli), and use colour names or hex codes, since function syntax such as rgb(...) is not accepted. The colour applies while the trial is shown and is cleared when it ends.

keyboard set to r g b maps one key to each ink, and key holds the initial of the ink colour, never the word, so the same r is correct for congruent RED in red and incongruent GREEN in red. Responses are scored into the correct results column; keep the key values lowercase, because a response that matches only after ignoring case is recorded as unscored rather than incorrect. With no presTime set, the word stays up until the keypress ends the trial, so RT captures the full naming latency from word onset.

condition1 and condition2 are pure metadata: congruency and ink are copied into every saved results row, giving you the congruent versus incongruent split, and the per-ink breakdown, without parsing stimulus cells at analysis time.

  • Add a deadline with responseWindow, for example 2000; a trial with no press records timeout and moves on.
  • Jitter the pre-word interval with ITI set to a range such as 800_1600, redrawn on every presentation.
  • Swap named colours for hex codes in color (for example stim1:#D62828) to pin down the exact hues instead of relying on browser colour names.
  • Grow the design by repeating the six rows with more colour words; keep every word-ink pairing on its own row so condition1 stays accurate.