No rgb255 colorspace in v2021.2.3

OS : Win10
PsychoPy version : v2021.2.3
What are you trying to achieve?:
I used to build my experiment in older version of psychopy (v2020.1.3) and to create polygon and choose the color in the rgb255 colorspace.
I installed this new version, and the colors of my polygons are now wrong (because in the rgb colorspace) and I cannot find the way to change the color space to rgb255.
Is there an easy way to do that ?

Thank you in advance.

Best regards,

Were they set to rgb255 in builder, or via code?

Yes, they are set in the builder, that is why I am struggling because the rgb255 in not available in the list of color spaces

Ah, yes I think it was listed briefly but was removed for simplicity. While it’s not an option for the stimulus, you can set the space of a specific colour by, rather than supplying a value, supplying a colour object, which has its own colour space. You can do it like so:

$colors.Color(value, 'rgb255')

with value being whatever the current value in that box is. Alternatively, as RGB and RGB255 are relatively easy to convert from, you can change the value manually by just dividing by 255, then doubling & subtracting 1, as that’s all the conversion functions do.

Thank you very much!
The solution “$colors.Color(value, ‘rgb255’)” worked well !

1 Like