# NOT RUN {
stimuli <- demo_stim()
# get colour from the upper left corder
patch(stimuli)
# get median colour from centre .1 width pixels
patch(stimuli, width = .1, height = .1,
x_off = .45, y_off = .45)
# get mean rgb colour from full image
patch(stimuli, width = 1, height = 1,
color = "rgb", func = mean)
# }
Run the code above in your browser using DataLab