psychojs icon indicating copy to clipboard operation
psychojs copied to clipboard

Color: PsychoJS uses `util.Color` while PsychoPy uses `colors.Color`

Open TEParsons opened this issue 3 years ago • 1 comments

This causes problems like this user was having: https://github.com/psychopy/psychopy/issues/4344

when auto translating from Python to JS - if they were in the same place, they'd be able to do colors.Color('red') in Python and it would be new colors.Color('red') in JS. I can add to the transcriber that colors.Color needs to translate as util.Color, but in the interest of synchronicity shouldn't the libraries be structured the same as much as possible?

TEParsons avatar Jan 07 '22 14:01 TEParsons

Since there is no "colors" sub-directory under the "psychopy" directory, I would advocate for the transpiler to take care of this. Also "Color.js" would be very lonely in its own "colors" sub-directory.

apitiot avatar Jan 18 '22 10:01 apitiot