psychojs icon indicating copy to clipboard operation
psychojs copied to clipboard

Have new util.Color return transparent color for undefined

Open dvbridges opened this issue 5 years ago • 1 comments

Currently, passing util.Color an undefined value returns a default color ("Black"). This means that users cannot create transparent shapes. To fix, util.Color should return undefined or transparent color when fed any of the following:

[undefined, "undefined", null, "null", "None", "none", '']

dvbridges avatar Nov 08 '19 11:11 dvbridges

@dvbridges I took a quick look through util/Color.js to see if this was an easy fix I could help with, but it's not obvious to me how to represent transparent. Do we need to add masks / an alpha layer to the idea of color? What would be the "right" default color space, the experiment default? Seems like this is a pretty commonly requested one.

kastman avatar Dec 06 '19 21:12 kastman