RGBA color specification does not work in OS 3.3.10 / OSWeb 1.4
Hi,
After the update to OpenSesame 3.3.10, I ran into an issue with OSWeb.
Until 3.3.9, I used rgba with an alpha of .01 to align text, as suggested in the manual (https://osdoc.cogsci.nl/3.3/manual/stimuli/text/)
However, this now produces an error:
uncaught exception: Invalid color specification: rgba(0,0,0,.01) (string) See the console for further details
A workaround is, of course, to use rgb and set the color to the backgroundcolor. But is there still a way to hide text using alpha? This could be useful for multicolored background.
Attached is also an example to recreate the error. Hiding text by setting the color to the background color works but setting rgba produces the error. This error occured for me with both firefox and edge (but only in the browsers, not when starting within OpenSesame, which is why I assume this error to lie with OSWeb).
Best,
Leo
Comments
Hi @Leo ,
This will still work, but only on the desktop and not when running in a browser. The reason is that OpenSesame on the desktop uses a more advanced way to render text, which supports RGBA color specifications. OSWeb uses a simpler way to render text, which supports only the colors specifications that are described here.
I don't see any convenient way to implement transparent text in OSWeb. Maybe you could simply generate text as bitmaps and add a transparency layer that way?
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!