Color Shapes
An executive function task from the m2c2kit library. Participants see colored shapes on a grid, then after a brief delay must judge whether the shapes have the same or different colors as before.
- Duration: ~90 s
- Source: m2c2kit
- Deployed version:
assessment-color-shapes@0.8.33 - Launch URL: https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/
Example URL commands
# Plain launch (debug mode: results shown on-screen)
https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/
# With camera recording
https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/?webcam=1
# With eye tracking
https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/?webgazer=1
# Customized assessment parameters (values shown are the defaults)
https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/?fixation_duration_ms=500&number_of_shapes_shown=3&number_of_shapes_changing_color=2
# Production: submit results to your server
https://andreifoldes.github.io/m2c2-assessments/dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/?token=<TOKEN>&callback_url=<CALLBACK_URL>
Session parameters
Handled by the launch wrapper (results submission and optional sensors), not by the assessment itself.
| Parameter | Type | Default | Description |
|---|---|---|---|
callback_url | string | — | URL to POST results to when the assessment ends. |
pid | string | — | Optional participant identifier. Echoed verbatim into the results: top-level pid next to token in the callback POST, inside data, and in the embed-mode postMessage. Useful when the callback endpoint does not mint per-participant tokens, or to link multi-session designs (e.g. FNAME-Pairs learning vs. delayed) from the URL alone. |
token | string | — | Authentication token for results submission. When absent (along with callback_url), the assessment runs in debug mode and displays results on-screen instead of submitting them. |
webcam | string | — | Set to 1 or true to enable optional camera recording. Participants see a consent prompt; if they accept, the front camera records and the video is saved locally to their device at session end. |
webgazer | string | — | Set to 1 or true to enable browser-based eye tracking via WebGazer.js. Participants see a consent prompt, then a 5-point gaze calibration. Gaze coordinates are recorded throughout the task and exported as a CSV file at session end. Can be combined with webcam=1. |
Assessment parameters
Every parameter below can be set directly as a URL query parameter — the launch wrapper forwards all query parameters to the assessment.
| Parameter | Type | Default | URL | Description |
|---|---|---|---|---|
fixation_duration_ms | number | 500 | ✅ | How long fixation scene is shown, milliseconds. |
shape_colors | array | [{"colorName":"black","rgbaColor":[0,0,0,1]},{"colorName":"green","rgbaColor":[0,158,115,1]},{"colorName":"yellow","rgbaColor":[240,228,66,1]},{"colorName":"blue","rgbaColor":[0,114,178,1]},{"colorName":"orange","rgbaColor":[213,94,0,1]},{"colorName":"pink","rgbaColor":[204,121,167,1]}] | ✅ | Array of colors for shapes. |
number_of_shapes_shown | integer | 3 | ✅ | How many shapes to show on the grid at one time. |
number_of_shapes_changing_color | integer | 2 | ✅ | If a different color trial, how many shapes should change color (minimum is 2, because changes are swaps with other shapes). |
shapes_presented_duration_ms | number | 2000 | ✅ | How long the shapes are shown, milliseconds. |
shapes_removed_duration_ms | number | 1000 | ✅ | How long to show a blank square after shapes are removed, milliseconds. |
cells_per_side | integer | 3 | ✅ | How many cell positions for each side of the square grid (e.g., 3 is a 3x3 grid; 4 is a 4x4 grid). |
number_of_different_colors_trials | integer | 6 | ✅ | Number of trials where the shapes have different colors. |
number_of_trials | integer | 12 | ✅ | How many trials to run. |
show_trials_complete_scene | boolean | false (site override; package default true) | ✅ | After the final trial, should a completion scene be shown? Otherwise, the game will immediately end. |
instruction_type | string | long | ✅ | Type of instructions to show, 'short' or 'long'. Allowed values: "short", "long". |
instructions | object or null | null | ✅ | When non-null, an InstructionsOptions object that will completely override the built-in instructions. |
show_quit_button | boolean | false | ✅ | Should the activity quit button be shown? |
show_fps | boolean | false | ✅ | Should the FPS be shown? |
show_locale_picker | boolean | false | ✅ | Should the icon that allows the participant to switch the locale be shown? |
seed | string or null | null | ✅ | Optional seed for the seeded pseudo-random number generator. When null, the default Math.random() is used. |
scoring | boolean | false | ✅ | Should scoring data be generated? Default is false. |
Generated from dist/modules/@m2c2kit/assessment-color-shapes@0.8.33/dist/index.js and dist/assessments/@m2c2kit/assessment-color-shapes@0.8.33/index.js. Do not edit by hand.