/* Test color adjustment. */
Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Adjustable Color";
SubjectCode = "pxlab";
}
Session(){
Instruction(){
Text = ["Adjust a Color with the Mouse", " ", "Try to adjust the right field such that it is equal in color to the left field.", " ", "Hue: Press the left mouse button and move the mouse left/right to adjust hue along a hue circle.", "Brightness: Press the left mouse button and move the mouse up/down to increase or decrease brightness.", "Chroma: Press the right mouse button and move the mouse up/down to increase or decrease chroma.", "Press the space bar to indicate that adjustment is finished.", " ", "Press any key now to start!"];
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Trial( SimpleBar.Color, SimpleBar:Adjusted.Color){
SimpleBar(){
Timer = de.pxlab.pxl.TimerCodes.NO_TIMER;
Width = 100;
Height = 200;
LocationX = -50;
JustInTime = 1;
}
SimpleBar:Adjusted(){
AdjustableColorPar = "Trial.SimpleBar:Adjusted.Color";
Timer = de.pxlab.pxl.TimerCodes.KEY_RESPONSE_TIMER|de.pxlab.pxl.TimerCodes.MOUSE_TRACKING_TIMER;
ResponseSet = SPACE_KEY;
AdjustableCoordinates = de.pxlab.pxl.ColorAdjustBitCodes.LIGHTNESS|de.pxlab.pxl.ColorAdjustBitCodes.HUE|de.pxlab.pxl.ColorAdjustBitCodes.CHROMA;
HueStep = 0.0001;
ChromaStep = 0.001;
LightnessStep = 0.001;
InitialRandomSteps = 1;
Width = 100;
Height = 200;
LocationX = 50;
Overlay = de.pxlab.pxl.OverlayCodes.TRANSPARENT;
JustInTime = 1;
}
Feedback(){
Text = "Target Color = %Trial.SimpleBar.Color%\nMatching Color = %Trial.SimpleBar:Adjusted.Color%\n \nPress a key to go on!";
FontSize = 32;
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block(){
Trial( [25, 0.5, 0.329], ?);
}
}
}
}