Changing imageStim saturation with slider in PsychoJS

Thanks so much! This is really helpful :slight_smile: I was just wondering - I’ve had a look at your function and compared it to the color-convert/conversions.js at master · Qix-/color-convert · GitHub function it was adapted from. I was wondering why you converted from v = hsv[2] / 100 in the original function to v = hsv[2] in your function? Just trying to understand each step in order to double check it :slight_smile: Thanks a lot for your help.

Secondly, I was wondering if it is possible to use this code to then re-use the function in Python before converting back to JS? Basically, I want to use these functions in Python in an auto->JS code component. I’ve seen that I should define the function at the beginning of the experiment, however I still get the ‘can’t find variable’ error.