Hue and RGB of images change when running experiment


I am creating an experiment that displays squares of different hues/colours and requires participants to sort them into a continuous gradient based on hue. It is very important that the images, which are being presented as .png images, maintain their correct hue when displayed. I noticed the squares look slightly different when I run my PsychoPy experiment, so I took a screenshot and tested the hue and RGB values of the squares in GIMP (photoshop app). Turns out they have a different hue and RGB value when presented in my experiment.

I thought the change in hue values may be due to the screenshot process, however the squares clearly look different on PsychoPy to and cannot be placed in a nice gradient.

Any ideas why this may be the case and how I can prevent the altering my images? Thanks in advance.

1 Like

It is great that you are testing this.

If you open PsychoPy’s Monitor Centre, has some sort of gamma correction been applied?

Once the issue is sorted, you might find it more practical to programmatically create stimuli (e.g. filled polygons) with the appropriate colour values.

Thanks for the quick response! How can you check for a gamma correction? I attached a screenshot of my Monitor and the Gamma seems to be set to 1.0, which I assume there is no correction.

I also tried to use the colour picker tool on PsychoPy directly on my original square colour when designating the colour of a polygon. Even though I used the square directly, the colour did not accurately translate on the polygon (visibly different colour and tested on GIMP after running the experiment).

Original square with RBG values and hue:

PsychoPy colour picker used on the original square on the right:

Resulting polygon (top centre):

Polygon with RBG values and hue:

I also tried to get the hexadecimal string name and use it to set the colour of the polygon:

I tested the selected colour on the webpage and it was a perfect match, however when using this code in PsycoPy it resulted in the same issue where the RBG and hue were changed.