| Reference | Downloads | Github

RGB colour space limits differ in visual.ImageStim

In the psychopy documentation, it states that RGB values vary between -1 to 1.
I find this to work well when creating a psychopy.visual.Rect or visual.ImageStim when the colour is specified in ImageStim.Color.

However, when I load a numpy array (with rgb values ranging -1 to 1) and display it using visual.ImageStim(image=rgbarray), the colours appear distorted/saturated. Furthermore, if I convert the rgb values to range between 0-1 then it displays normally again, contrary to psychopy documentation.

Finally, if I display the np.array Image using Visual.GratingStim(tex=rgbarray), (rgb values varying between -1 and 1), then the image displays normally again. Is this a bug or have I done something wrong?