Skip to main content

Stroop Task

Version: v1 (current)

Overview

The Stroop Task is one of the most widely used paradigms in cognitive psychology, measuring selective attention and cognitive control. Participants see color words (like "RED" or "BLUE") displayed in colored ink and must name the ink color while ignoring the word itself. When the word and ink color mismatch (e.g., the word "RED" in blue ink), response times slow and errors increase. This interference is known as the Stroop effect.

This task measures executive functions including response inhibition, selective attention, and processing speed. The interference from automatic word reading provides a window into how the brain resolves conflicting information streams.

Scientific Background

The Stroop effect, first documented by John Ridley Stroop in 1935, demonstrates that reading words is such an automatic process that it interferes with the more deliberate task of color naming. Key findings:

  • Stroop, J.R. (1935). Studies of interference in serial verbal reactions. Journal of Experimental Psychology, 18(6), 643-662.
  • MacLeod, C.M. (1991). Half a century of research on the Stroop effect: An integrative review. Psychological Bulletin, 109(2), 163-203.

The task typically includes three trial types:

  • Congruent: Word and color match (e.g., "RED" in red ink). This condition produces the fastest responses.
  • Incongruent: Word and color mismatch (e.g., "RED" in blue ink). This condition produces the slowest responses and the most errors.
  • Neutral: Non-color word or symbol in color (e.g., "XXX" in red ink). This condition serves as the baseline.

The Stroop effect = mean RT(incongruent) − mean RT(congruent)

Why Researchers Use This Task

  • Executive function assessment: Measures cognitive control and inhibition
  • Clinical applications: Sensitive to ADHD, depression, anxiety, aging, and neurological conditions
  • Individual differences: Stroop interference varies across populations and correlates with other executive measures
  • Attention research: Probes automatic vs. controlled processing
  • Bilingualism studies: Tests language control in multilingual individuals
  • Neuroimaging: Robust activation in prefrontal and anterior cingulate cortex

Task Parameters

Timing Configuration

ParameterTypeDefaultDescription
Stroop Time BasedbooleanTrueIf True, trials auto-advance after stimulus duration; if False, participant clicks to advance

Visual Configuration

ParameterTypeDefaultDescription
Stroop Font Size (px)number96Font size for color words in pixels (8-400)

Speech Recognition

ParameterTypeDefaultDescription
Stroop Languagestring'en-US'Language code for speech recognition (e.g., 'en-US', 'fr-FR')

Practice Trials

ParameterTypeDefaultDescription
Stroop Practice EnabledbooleanFalseEnable practice trials with visual feedback
Stroop Practice Trialsarray[]Array of practice trial configurations (same structure as main trials)

Trial Configuration

Each trial is defined in the Trials spreadsheet with the following columns:

ColumnDescriptionExample
textThe word displayedRed, Blue, Green, Yellow
color_hexInk color as hex code#FF0000 (red), #0000FF (blue)
conditionTrial typeCongruent, Incongruent, Neutral
expected_answerCorrect spoken responseRed, Blue (matches speech recognition)
fixation_msFixation cross duration500
stimulus_msWord display duration2000
blockOptional grouping labelPractice, Main, Block 1

Example Trials

| text   | color_hex | condition    | expected_answer | fixation_ms | stimulus_ms | block  |
|--------|-----------|--------------|-----------------|-------------|-------------|--------|
| RED | #FF0000 | congruent | Red | 500 | 2000 | main |
| RED | #0000FF | incongruent | Blue | 500 | 2000 | main |
| BLUE | #0000FF | congruent | Blue | 500 | 2000 | main |
| BLUE | #FF0000 | incongruent | Red | 500 | 2000 | main |
| XXX | #00FF00 | neutral | Green | 500 | 2000 | main |

Use high-contrast, easily distinguishable colors:

  • Red: #FF0000 (expected_answer: "Red")
  • Blue: #0000FF (expected_answer: "Blue")
  • Green: #00FF00 (expected_answer: "Green")
  • Yellow: #FFFF00 (expected_answer: "Yellow")

Note: Yellow on white backgrounds can be hard to see. Consider #FFD700 (gold) as alternative.

Participant Experience

Trial Sequence

  1. Main Instructions: Participant reads task instructions explaining they should speak the ink color, not the word
  2. (Optional) Practice Instructions: If practice enabled, shown before practice trials
  3. (Optional) Practice Trials: Present with visual feedback showing the expected answer after each response
  4. (Optional) Trials Instructions: Shown after practice, before main trials
  5. Main Trials: Each trial follows this sequence:
    • Fixation cross (+) appears (if fixation_ms > 0)
    • Color word appears in colored ink
    • Participant speaks the ink color
    • Speech recognition captures response
    • Trial advances after stimulus_ms (time-based) or button click (button-based)

Speech Recognition

The task uses the browser's built-in speech recognition API. Participants should:

  • Speak clearly in a quiet environment
  • Use the color names exactly as specified in expected_answer column
  • Allow microphone access when prompted
  • See a microphone icon and audio level indicator when the system is listening

Response Modes

Time-based mode (stroop_time_based: true):

  • Trials auto-advance after stimulus_ms
  • Participant speaks as soon as they see the word
  • Best for timed experimental protocols

Button-based mode (stroop_time_based: false):

  • Participant clicks "Next" to advance after speaking
  • Allows self-paced responding
  • Useful for participants who need more time

Data Output

Markers and Responses

The task records high-resolution timestamps in two separate collections:

Markers (stimulus_shown):

{
"type": "stimulus_shown",
"ts": "2024-01-01T00:00:01.000Z",
"hr": 1234.56,
"data": {
"trial_index": 1,
"stimulus_id": "stroop_0_1",
"word": "RED",
"color": "#0000FF",
"condition": "incongruent",
"expected_answer": "Blue",
"block": "main"
}
}

Response Data:

{
"trial_index": 1,
"stimulus_id": "stroop_0_1",
"source": "speech",
"transcript": "blue",
"transcribed_answer": "Blue",
"response_correct": true,
"latency_ms": 847,
"condition": "incongruent",
"ts": "2024-01-01T00:00:01.847Z",
"hr": 2081.56
}

Summary Artifact

A JSON file (stroop_summary_<taskIndex>.json) with aggregated statistics:

{
"task_kind": "stroop",
"total_trials": 40,
"overall": {
"accuracy": 0.925,
"mean_rt_ms": 758,
"mean_correct_rt_ms": 731
},
"by_condition": {
"congruent": {
"accuracy": 0.95,
"mean_correct_rt_ms": 652
},
"incongruent": {
"accuracy": 0.90,
"mean_correct_rt_ms": 823
},
"neutral": {
"accuracy": 0.93,
"mean_correct_rt_ms": 698
}
},
"stroop_effect_ms": 171,
"trials": [ /* per-trial data */ ]
}

Key metrics:

  • stroop_effect_ms: Difference between incongruent and congruent mean RTs
  • accuracy: Proportion of correct responses
  • mean_rt_ms: Average reaction time (stimulus onset to speech recognition)

Design Recommendations

Trial Design

Balanced design (recommended for most studies):

  • 20 congruent trials
  • 20 incongruent trials
  • 10 neutral trials (optional, for baseline)
  • Randomize trial order
  • Use at least 4 different color words

Minimum for reliable Stroop effect:

  • 12 congruent trials
  • 12 incongruent trials

Avoid:

  • Long runs of the same condition
  • Predictable patterns
  • Too few unique stimuli (creates repetition priming)

Timing Guidelines

ParameterRecommended RangeNotes
Fixation (ms)300-800ms500ms is standard
Stimulus (ms)1500-3000msDepends on population; older adults may need longer

Practice Trials

Include 6-12 practice trials:

  • Mix of congruent and incongruent
  • Provide feedback so participants understand the task
  • Use all color words that appear in main trials
  • Consider using easier trials (all congruent) initially

Speech Recognition Considerations

Browser compatibility:

  • Works best in Chrome/Edge (uses Google Speech API)
  • Firefox support varies
  • Safari has limited support
  • Not supported in all languages

Instructions to participants:

  • Speak clearly at normal volume
  • Minimize background noise
  • If recognition fails, they can click Next to continue

Language setup:

  • Set stroop_language to match participant's language
  • Ensure expected_answer values match how speakers naturally say colors in that language
  • Test speech recognition with native speakers before data collection

Color Selection

For standard Stroop:

  • Use primary colors: Red, Blue, Green, Yellow
  • Ensure high contrast against white background
  • Avoid colors that are linguistically ambiguous

For specialized populations:

  • Consider color-blind friendly palettes (avoid red-green only)
  • Test color visibility on actual display devices

Common Issues and Solutions

Speech Recognition Not Working

Problem: Microphone icon doesn't appear or speech not recognized

Solutions:

  • Check browser supports speech recognition (use Chrome/Edge)
  • Ensure microphone permissions granted
  • Test microphone in browser settings
  • Use button-based mode as fallback

High Error Rates

Problem: Accuracy below 80%

Possible causes:

  • Speech recognition language mismatch
  • Ambiguous expected_answer values
  • Participants misunderstanding instructions
  • Stimulus duration too short

Solutions:

  • Verify stroop_language matches participant language
  • Check expected_answer matches how participants naturally speak colors
  • Extend practice trials with clearer feedback
  • Increase stimulus_ms for slower populations

No Stroop Effect

Problem: Incongruent RT not longer than congruent RT

Possible causes:

  • Too few trials (high variability)
  • Participants not reading words
  • Timing issues (stimulus too brief or too long)

Solutions:

  • Increase trials per condition (minimum 12 each)
  • Emphasize speed in instructions
  • Use standard timing (500ms fixation, 2000ms stimulus)

Example Study Configurations

Standard Adult Stroop (Speech Recognition)

  • 40 trials total (20 congruent, 20 incongruent)
  • 4 colors (Red, Blue, Green, Yellow)
  • 500ms fixation, 2000ms stimulus
  • Time-based mode
  • Practice: 8 trials with feedback

Clinical Assessment Version

  • Extended practice (12 trials)
  • Longer stimulus duration (3000ms)
  • Button-based mode (self-paced)
  • Fewer trials (24 total) to reduce fatigue
  • Include neutral baseline

Developmental/Child Version

  • Large font size (120px)
  • Longer stimulus duration (3000ms)
  • Button-based mode
  • Extensive practice with feedback
  • Bright, engaging colors
  • Fewer trials (30 total)

References

  • Stroop, J.R. (1935). Studies of interference in serial verbal reactions. Journal of Experimental Psychology, 18(6), 643-662.
  • MacLeod, C.M. (1991). Half a century of research on the Stroop effect: An integrative review. Psychological Bulletin, 109(2), 163-203.
  • MacLeod, C.M., & MacDonald, P.A. (2000). Interdimensional interference in the Stroop effect: Uncovering the cognitive and neural anatomy of attention. Trends in Cognitive Sciences, 4(10), 383-391.